@vyke/time
v0.0.3
Published
A small library to convert time to different units
Downloads
14
Readme
A small library to convert time to different units
Features
- Convert time to different units
- Simple API
- No dependencies
- Tiny size
Installation
npm i @vyke/time
Examples
import { seconds } from '@vyke/time'
console.log(seconds(30, 'm')) // 0.5
// convert by default to milliseconds
console.log(seconds(30)) // 30000
API
days
Convert a time amount from days to other time units
hours
Convert a time amount from hours to other time units
minutes
Convert a time amount from minutes to other time units
seconds
Convert a time amount from seconds to other time units
milliseconds
Convert a time amount from milliseconds to other time units