New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@vates/parse-duration

Package Overview
Dependencies
Maintainers
5
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vates/parse-duration

Small wrapper around ms to parse a duration

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
5
Created
Source

@vates/parse-duration

Package Version License PackagePhobia Node compatibility

Small wrapper around ms to parse a duration

Install

Installation of the npm package:

> npm install --save @vates/parse-duration

Usage

ms without magic: always parse a duration and throws if invalid.

import { parseDuration } from '@vates/parse-duration'

parseDuration('2 days')
// 172800000

parseDuration(172800000)
// 172800000

parseDuration(undefined)
// throws TypeError('not a valid duration: undefined')

Contributions

Contributions are very welcomed, either on the documentation or on the code.

You may:

  • report any issue you've encountered;
  • fork and create a pull request.

License

ISC © Vates SAS

Keywords

duration

FAQs

Package last updated on 05 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts