Socket
Socket
Sign inDemoInstall

date-fns-duration

Package Overview
Dependencies
1
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.3 to 1.0.4

13

package.json
{
"name": "date-fns-duration",
"version": "1.0.3",
"version": "1.0.4",
"description": "Supplemental package for date-fns to add/subtract ISO 8601 durations",
"main": "index.js",
"scripts": {
"test": "mochista -t index.test.js",
"test": "jest index.test.js",
"cov": "npm t -- --coverage",
"testw": "npm t -- --coverage --watch",
"tsc": "tsc",
"lint": "eslint"
"lint": "eslint *.js"
},

@@ -20,3 +20,3 @@ "repository": "pke/date-fns-duration",

],
"author": "Philipp Kursawe <phil.kursawe@gmail.com> (https://pke.fyi/)",
"author": "Philipp Kursawe <pke@pke.fyi> (https://pke.fyi/)",
"license": "MIT",

@@ -30,7 +30,4 @@ "peerDependencies": {

"eslint-plugin-mocha": "6.2.2",
"mochista": "0.22.0"
},
"dependencies": {
"date-fns": "^2.0.1"
"jest": "26.6.3"
}
}

@@ -15,3 +15,13 @@ # data-fns-duration

```js
addDuration(date, duration)
import addDuration from 'date-fns-duration';
// addDuration(date, duration);
// Add duration
const two_hours_from_now = addDuration(Date.now(), "PT2H");
// Subtract duration
const month_before = addDuration("2018-10-02T10:00", "-P1M");
```
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