Skip to content

tubalmartin/ms.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ms.js: miliseconds conversion utility

ms('1d')      // 86400000
ms('10h')     // 36000000
ms('2h')      // 7200000
ms('1m')      // 60000
ms('5ms')     // 5000
ms('100')     // '100'
ms(100)       // 100
  • Node/Browser compatible. Published as ms in NPM.
  • If a number is supplied to ms, it returns it immediately.
  • If a string that contains the number is supplied, it returns it as a number (e.g: it returns 100 for '100').
  • If you pass a string with a number and a valid unit, hte number of equivalent ms is returned.

About

Tiny milisecond conversion utility.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%