css-duration
Advanced tools
Comparing version 0.1.1 to 0.1.2
{ | ||
"name": "css-duration", | ||
"version": "0.1.1", | ||
"description": "Converts CSS durations to milliseconds.", | ||
"version": "0.1.2", | ||
"description": "Converts CSS-style durations to milliseconds.", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "author": "Brandon Semilla (https://github.com/grandonbroseph)", |
# css-duration | ||
Converts CSS durations to milliseconds. | ||
Converts CSS-style durations to milliseconds. | ||
## Installation | ||
`npm install --save css-duration` | ||
## Usage | ||
```javascript | ||
var duration = require("css-duration") | ||
duration('1000ms') | ||
// > 1000 | ||
duration('1.5s') | ||
// > 1500 | ||
duration('30m') | ||
// > 1800000 | ||
duration('8h') | ||
// > 28800000 | ||
duration('2d') | ||
// > 172800000 | ||
``` |
4329
5
27