Add .gitignore to exclude all node packages and lock files
This commit is contained in:
Generated
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.validateJpegQuality = exports.DEFAULT_JPEG_QUALITY = void 0;
|
||||
exports.DEFAULT_JPEG_QUALITY = 80;
|
||||
const validateJpegQuality = (q) => {
|
||||
if (typeof q !== 'undefined' && typeof q !== 'number') {
|
||||
throw new Error(`JPEG Quality option must be a number or undefined. Got ${typeof q} (${JSON.stringify(q)})`);
|
||||
}
|
||||
if (typeof q === 'undefined') {
|
||||
return;
|
||||
}
|
||||
if (!Number.isFinite(q)) {
|
||||
throw new RangeError(`JPEG Quality must be a finite number, but is ${q}`);
|
||||
}
|
||||
if (Number.isNaN(q)) {
|
||||
throw new RangeError(`JPEG Quality is NaN, but must be a real number`);
|
||||
}
|
||||
if (q > 100 || q < 0) {
|
||||
throw new RangeError('JPEG Quality option must be between 0 and 100.');
|
||||
}
|
||||
};
|
||||
exports.validateJpegQuality = validateJpegQuality;
|
||||
Reference in New Issue
Block a user