@randy.tarampi/pseudoimage

4.0.0 • Public • Published

ʕつ◕ᴥ◕ʔつ 📷 → Your application's pseudolocales' image folders

npm versions npm downloads npm bundle size (minified) npm bundle size (minified + gzip) npm license Build status Build status Coverage status Maintainability status Analytics

Install @randy.tarampi/pseudoimage

This uses @randy.tarampi/lwip to modify your images to create a fake, which gets saved somewhere.

Usage

let Pseudoimage = require("@randy.tarampi/pseudoimage");
let sourceDirectory = "/Users/randy.tarampi/Desktop/images";
let destinationDirectory = "/Users/randy.tarampi/Desktop/fakeImages";
let expect = require("chai").expect;

let pseudoimage = new Pseudoimage(sourceDirectory, destinationDirectory);
pseudoimage.generatePseudoImages();

// There should be a copy for each supported image in `sourceDirectory` in `destinationDirectory`
let files = fs.readdirSync(sourceDirectory);
files.map((file) => {
	openImage(file)
		.then((image) => {
			expect(images[0].width()).to.eql(images[1].width());
			expect(images[0].height()).to.eql(images[1].height());
		})
		.catch((error) => {
			console.error(error); // Shouldn't see any errors
		});
});

function openImage(imagePath) {
	return new Promise((resolve, reject) => {
		pseudoimage.open(imagePath, (error, image) => {
			if (error) {
				reject(error);
				return;
			}
			resolve(image);
		})
	});
}

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
4.0.02latest

Version History

VersionDownloads (Last 7 Days)Published
4.0.02
3.1.190
3.1.180
3.1.170
3.1.160
3.1.150
3.1.140
3.1.130
3.1.120
3.1.110
3.1.100
3.1.90
3.1.80
3.1.70
3.1.60
3.1.50
3.1.40
3.1.30
3.1.20
3.1.10
3.1.00
3.0.20
3.0.10
3.0.00
2.12.50
2.12.40
2.12.30
2.12.20
2.12.10
2.12.00
2.11.50
2.11.41
2.11.30
2.11.20
2.11.10
2.11.00
2.10.60
2.10.50
2.10.40
2.10.30
2.10.20
2.10.10
2.10.00
2.8.10
2.8.00
2.7.00
2.6.00
2.5.00
2.4.60
2.4.50
2.4.40
2.4.30
2.4.20
2.4.10
2.4.01
2.3.00
2.2.30
2.2.20
2.2.11
2.2.00
2.1.40
2.1.31
2.1.20
2.1.10
2.1.00
2.0.70
2.0.61
2.0.50
2.0.40
2.0.30
2.0.20
2.0.10
2.0.01
1.7.20
1.7.10
1.7.00
1.6.30
1.6.20
1.6.10
1.6.00
1.5.31
1.5.20
1.5.10
1.5.00
1.4.00
1.3.90
1.3.80
1.3.70
1.3.60
1.3.50
1.3.41
1.3.30
1.3.20
1.3.10
1.3.00
1.2.50
1.2.41
1.2.30
1.2.20
1.2.11
1.2.00
1.1.80
1.1.70
1.1.60
1.1.50
1.1.41
1.1.30
1.1.20
1.1.10
1.1.00
1.0.20
1.0.00
0.48.00
0.47.220
0.47.210
0.47.200
0.47.190
0.47.180
0.47.171
0.47.160
0.47.150
0.47.140
0.47.130
0.47.120
0.47.110
0.47.101
0.47.90
0.47.81
0.47.70
0.47.60
0.47.50
0.47.40
0.47.30
0.47.20
0.47.10
0.47.00
0.46.10
0.46.00
0.45.80
0.45.71
0.45.60
0.45.50
0.45.40
0.45.30
0.45.21
0.45.10
0.45.00
0.44.01
0.43.130
0.43.120
0.43.111
0.43.100
0.43.91
0.43.80
0.43.70
0.43.60
0.43.50
0.43.40
0.43.30
0.43.20
0.43.10
0.43.01
0.42.20
0.42.10
0.42.00
0.41.70
0.41.60
0.41.50
0.41.40
0.41.30
0.41.20
0.41.10
0.41.00
0.40.190
0.40.180
0.40.170
0.40.160
0.40.150
0.40.140
0.40.130
0.40.120
0.40.110
0.40.100
0.40.90
0.40.80
0.40.70
0.40.60
0.40.50
0.40.40
0.40.30
0.40.20
0.40.10
0.40.00
0.39.130
0.39.120
0.39.110
0.39.100
0.39.90
0.39.80
0.39.70
0.39.60
0.39.50
0.39.40
0.39.30
0.39.20
0.39.10
0.39.00

Package Sidebar

Install

npm i @randy.tarampi/pseudoimage

Weekly Downloads

22

Version

4.0.0

License

MIT

Unpacked Size

702 kB

Total Files

8

Last publish

Collaborators

  • randy.tarampi