css-duration
Advanced tools
Comparing version 0.2.0 to 0.3.0
@@ -1,2 +0,2 @@ | ||
var strip = require('css-strip-units') | ||
var unit = require('css-get-unit') | ||
@@ -10,3 +10,4 @@ module.exports = duration | ||
var number = parseFloat(time) | ||
switch (strip(time)) { | ||
switch (unit(time)) { | ||
case null: | ||
case 'ms': return number | ||
@@ -13,0 +14,0 @@ case 's': return number * 1000 |
{ | ||
"name": "css-duration", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "Converts CSS-style durations to milliseconds.", | ||
@@ -23,3 +23,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"css-strip-units": "^1.0.0" | ||
"css-get-unit": "^1.0.0" | ||
}, | ||
@@ -26,0 +26,0 @@ "devDependencies": { |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
2997
18
0
+ Addedcss-get-unit@^1.0.0
+ Addedcss-get-unit@1.0.1(transitive)
- Removedcss-strip-units@^1.0.0
- Removedcss-strip-units@1.0.0(transitive)