1.0.6 • Published 5 years ago

variable-ms v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
5 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

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago