image-size
Advanced tools
Comparing version 0.9.5 to 0.9.6
@@ -20,9 +20,11 @@ "use strict"; | ||
pt: 96 / 72, | ||
px: 1 | ||
}; | ||
const unitsReg = new RegExp(`^([0-9.]+(?:e\\d+)?)(${Object.keys(units).join('|')})?$`); | ||
function parseLength(len) { | ||
const m = /([0-9.]+)([a-z]*)/.exec(len); | ||
const m = unitsReg.exec(len); | ||
if (!m) { | ||
return undefined; | ||
} | ||
return Math.round(parseFloat(m[1]) * (units[m[2]] || 1)); | ||
return Math.round(Number(m[1]) * (units[m[2]] || 1)); | ||
} | ||
@@ -29,0 +31,0 @@ function parseViewbox(viewbox) { |
{ | ||
"name": "image-size", | ||
"version": "0.9.5", | ||
"version": "0.9.6", | ||
"description": "get dimensions of any image file", | ||
@@ -51,19 +51,19 @@ "main": "dist/index.js", | ||
"@types/mocha": "8.2.1", | ||
"@types/node": "14.14.31", | ||
"@types/sinon": "9.0.10", | ||
"@typescript-eslint/eslint-plugin": "4.15.2", | ||
"@typescript-eslint/parser": "4.15.2", | ||
"chai": "4.3.0", | ||
"eslint": "7.20.0", | ||
"@types/node": "14.14.34", | ||
"@types/sinon": "9.0.11", | ||
"@typescript-eslint/eslint-plugin": "4.17.0", | ||
"@typescript-eslint/parser": "4.17.0", | ||
"chai": "4.3.4", | ||
"eslint": "7.22.0", | ||
"glob": "7.1.6", | ||
"mocha": "8.3.0", | ||
"mocha": "8.3.2", | ||
"nyc": "15.1.0", | ||
"sinon": "9.2.4", | ||
"ts-node": "9.1.1", | ||
"typedoc": "0.20.28", | ||
"typescript": "4.2.2" | ||
"typedoc": "0.20.32", | ||
"typescript": "4.2.3" | ||
}, | ||
"dependencies": { | ||
"queue": "6.0.1" | ||
"queue": "6.0.2" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
44803
1143
+ Addedqueue@6.0.2(transitive)
- Removedqueue@6.0.1(transitive)
Updatedqueue@6.0.2