Socket
Socket
Sign inDemoInstall

@tehshrike/duration-iso-8601

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @tehshrike/duration-iso-8601

Parse ISO 8601 Duration(PnYnMnDTnHnMnS syntax)


Version published
Weekly downloads
5.4K
increased by40.51%
Maintainers
1
Install size
5.87 kB
Created
Weekly downloads
 

Readme

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

FAQs

Last updated on 22 Jun 2020

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc