
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
nodejs-image-parser
Advanced tools
Nodejs image parser (convert images as @3x image into desired RGB, compress them, fix the names to snake_case and finally put as 1x,2x, 3x form). Good for react native/ iOS projects.
Nodejs image parser (convert images as @3x image into desired RGB, compress them, fix the names to snake_case and finally put as 1x,2x, 3x form). Good for react native/ iOS projects.
Source Image:
Output: ,
,
Source Image:
Output: ,
,
const ImageParser = require('./ImageParser');
const options = { srcDir: './img_src/', destDir: './img_dest/', color: { red: 0, green: 255, blue: 255 } };
ImageParser(options)
.then(() => {
console.log('all done');
})
.catch(err => {
console.log(err);
});
const ImageParser = require('./ImageParser');
console.log(ImageParser.parseFileName('./img_dest/', 'arrowNext@3x.png', 1)); // ./img_dest/arrow_next.png
console.log(ImageParser.parseFileName('./img_dest/', 'arrowNext@3x.png', 2)); // ./img_dest/arrow_next@2x.png
console.log(ImageParser.parseFileName('./img_dest/', 'arrowNext@3x.png', 3)); // ./img_dest/arrow_next@3x.png
const ImageParser = require('./ImageParser');
ImageParser.getFiles('./img_src').then(files => console.log(files)); // arrowNext@3x.png, search@3x.png
const ImageParser = require('./ImageParser');
const options = { srcDir: './img_src/', destDir: './img_dest/', file: 'arrowNext@3x.png' color: { red: 0, green: 255, blue: 255 } };
ImageParser.changeImage(options).then(() => console.log('done'));
const ImageParser = require('./ImageParser');
const options = { destDir: './img_dest/', compressionSize: '50' };
ImageParser.compressImages(options).then(() => console.log('done'));
Voila & Thanks, Author: Gaurav D. Sharma
FAQs
Nodejs image parser (convert images as @3x image into desired RGB, compress them, fix the names to snake_case and finally put as 1x,2x, 3x form). Good for react native/ iOS projects.
The npm package nodejs-image-parser receives a total of 0 weekly downloads. As such, nodejs-image-parser popularity was classified as not popular.
We found that nodejs-image-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.