@vyke/time
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

@vyke/time

A small library to convert time to different units

npm version License: MIT

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

Others vyke projects

Readme

Keywords

none

Package Sidebar

Install

npm i @vyke/time

Weekly Downloads

1

Version

0.0.3

License

MIT

Unpacked Size

6.71 kB

Total Files

7

Last publish

Collaborators

  • albizures