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

date-duration

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

date-duration - npm Package Compare versions

Comparing version 1.1.2 to 1.2.0

18

dist/duration.js

@@ -49,6 +49,18 @@ 'use strict';

function createDuration(iso) {
var _iso$match = iso.match(parser),
_iso$match2 = (0, _toArray3.default)(_iso$match),
parts = _iso$match2.slice(1);
iso = iso || '';
if (iso && iso.length > 0 && iso[0] !== 'P') {
throw new Error('Invalid duration: ' + iso + ' (invalid format)');
}
var _ref = iso.match(parser) || [0, 0, 0, 0, 0, 0, 0, 0],
_ref2 = (0, _toArray3.default)(_ref),
parts = _ref2.slice(1);
if (parts.every(function (part) {
return typeof part === 'undefined';
})) {
throw new Error('Invalid duration: ' + iso + ' (no date or time elements specified)');
}
var _parts$map = parts.map(toInt),

@@ -55,0 +67,0 @@ _parts$map2 = (0, _slicedToArray3.default)(_parts$map, 7),

12

package.json
{
"name": "date-duration",
"version": "1.1.2",
"version": "1.2.0",
"description": "Manipulate Date objects with ISO 8601-formatted durations",

@@ -38,7 +38,7 @@ "main": "dist/duration.js",

"devDependencies": {
"babel-cli": "^6.24.1",
"babel-cli": "^6.26.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-es2015": "^6.24.1",
"babel-register": "^6.24.1",
"eslint": "^4.4.1",
"babel-register": "^6.26.0",
"eslint": "^4.7.2",
"eslint-config-standard": "^10.2.1",

@@ -49,7 +49,7 @@ "eslint-plugin-import": "^2.7.0",

"eslint-plugin-standard": "^3.0.1",
"mocha": "^3.5.0"
"mocha": "^3.5.3"
},
"dependencies": {
"babel-runtime": "^6.25.0"
"babel-runtime": "^6.26.0"
}
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc