1.0.0 • Published 2 years ago
@sabier/ms v1.0.0
ms
Convert string to milliseconds.
Install
$ npm install @sabier/ms
Examples
const { ms } = require('@sabier/ms')
ms('1h') // 3600000
ms('2h 30m') // 9000000
ms('3d 4h', true) // { name: '3 days, 4 hours', value: 273600000 }
ms('Hello world!', true) // null
License
1.0.0
2 years ago