milliseconds-converter
v1.0.0
Published
Insanely lightweight module for converting times to milliseconds.
Downloads
4
Maintainers
Readme
milliseconds-converter
Insanely lightweight module for converting times to milliseconds.
Literally 9 lines of code, it's just to make writing time in a way that's more readable without having to remember how many milliseconds are in a day, week, month, year.
Installation
npm install milliseconds-converter
Example
const ms = require('milliseconds-converter');
ms.seconds(2); // 2000
ms.minutes(2); // 120000
ms.hours(2); // 7200000
ms.days(2); // 172800000
ms.weeks(2); // 1209600000
ms.months(2); // 5259600000
ms.years(2); // 63115200000