Remove dynamic type checks

This commit is contained in:
Daniel Gasienica
2018-02-15 15:16:58 -05:00
parent f4ce36fcfc
commit 28a2dc5b8a
-5
View File
@@ -7,11 +7,6 @@ const DEFAULT_JPEG_QUALITY = 0.85;
// Documentation for `options` (`LoadImageOptions`):
// https://github.com/blueimp/JavaScript-Load-Image/tree/v2.18.0#options
exports.autoOrientImage = (fileOrBlobOrURL, options = {}) => {
const { quality } = options;
if (typeof quality !== 'undefined' && typeof quality !== 'number') {
throw new TypeError(`\`options.quality\` must be a number; got ${typeof quality}`);
}
const optionsWithDefaults = Object.assign(
{
type: 'image/jpeg',