Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
console.log(' --save-poster-images Save first frame of each page as image');
process.exit(1);
}
if (argv.help) {
usage();
}
const input = argv._[0];
if (!input) {
usage();
}
let pagesRange = null;
try {
pagesRange = multirange(
argv.pages || '0-',
{ parseUnbounded: true },
);
} catch (e) {
console.error('Invalid pages range');
process.exit(1);
}
let json;
try {
json = JSON.parse(fs.readFileSync(input, 'utf8'));
} catch (e) {
console.error(`Unable to load json ${input}`);
process.exit(1);
}
const mr = value =>
multirange(value, { parseUnbounded: true, parseNegative: true });