New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@tehshrike/duration-iso-8601

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tehshrike/duration-iso-8601

Parse ISO 8601 Duration(PnYnMnDTnHnMnS syntax)

2.0.2
latest
Source
npm
Version published
Maintainers
1
Created
Source

@tehshrike/duration-iso-8601

Parse ISO 8601 Duration(PnYnMnDTnHnMnS syntax)

https://en.wikipedia.org/wiki/ISO_8601#Durations

Installation

npm install @tehshrike/duration-iso-8601
const parse = require('@tehshrike/duration-iso-8601')

Examples

parse('P1Y2M3DT4H5M6S') // => { year: 1, month: 2, day: 3, hour: 4, minute: 5, second: 6 }

parse('P1Y30DT15M39S') // => { year: 1, day: 30, minute: 15, second: 39 }

parse('ieurht834') // => null

Keywords

duration

FAQs

Package last updated on 22 Jun 2020

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