1.0.0 • Published 3 years ago

timeslator v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

Summary

A package to convert a time unit to the other.

Guide

import { timeslator } from 'timeslator';

timeslator(24, { from: 'h', to: 'm'}) // 1440

First parameter is the time and Second parameter is the options.\n options must either be in plural/short form otherwise an error will be thrown.

// Correct Syntax ✅
{from: 'ms', to: 's'}
{from: 'milliseconds', to: 'seconds'}
{from: 'milliseconds', to: 's'}

// Incorrect Syntax ❌
{from: 'millisecond', to: 'seconds'} // Error: ⛔ No matches were found!

options are: <Milliseconds>, <Seconds>, <Minutes> and <Hours>\n Tip: they are case-insensitive

Installation

npm i timeslator

Support

For any issues that might have arisen, feel free to visit the support server.

1.0.0

3 years ago