duration-to-ms

0.1.0 • Public • Published

NPM version NPM downloads MIT License Build Status

A JavaScript library for converting duration string into milliseconds.

Example:

  import durationToMs from 'duration-to-ms'
 
  const DURATION = '24h'
 
  durationToMs(SESSION_DURATION)
  ms: millisecond
  s: second
  m: minute
  h: hour
  d: day
  w: week
  y: year

Package Sidebar

Install

npm i duration-to-ms

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

5.07 kB

Total Files

7

Last publish

Collaborators

  • dmytry-s