1.0.6 • Published 4 years ago

variable-ms v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

GitHub issues GitHub forks GitHub stars GitHub license

Convert various time formats to milliseconds

Examples

  • Convert '2 days' (string) to 172800000 (number)

    string to number

  • Convert 60000 (number) to 60000 (number)

    without changes

Installation

$ yarn add variable-ms

Usage

import ms from 'variable-ms';

let milliseconds;

milliseconds = ms('2 days');
console.log(milliseconds); // 172800000

milliseconds = ms(60000);
console.log(milliseconds); // 60000

Author

npm.io
Miguel Padrino

License

MIT © Miguel Padrino

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago