It converts whatever string into milliseconds which is entirely based off of comparing two Date objects into number! As long as it is a valid string!
npm i kto-ms --save
const ms = require('kto-ms') console.log(ms('1s')) // 1000 console.log(ms('1 s')) // 1000 console.log(ms('1 days')) // 86400000 console.log(ms('1 year')) // 31536000000