Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 715 Bytes

README.md

File metadata and controls

27 lines (19 loc) · 715 Bytes

msx

NPM Downloads

A minmalistic ms conversion library

Examples

Use the following command to install the msxlib package via npm:

npm install msxlib

Once installed, you can import and use the library in your code:

import msx from "msxlib";

console.log(MSX.parse("1ms")); // 1
console.log(MSX.parse("1s")); // 1000
console.log(MSX.parse("1m")); // 60000
console.log(MSX.parse("1h")); // 3600000
console.log(MSX.stringify(1)); // 1.00ms

For more information on how to use the msxlib package, please refer to the documentation.

NOTE: doesn't work with javascript only typescript at the moment