date-duration
Advanced tools
Comparing version 1.5.1 to 1.6.0
@@ -32,2 +32,6 @@ "use strict"; | ||
var _debug = _interopRequireDefault(require("debug")); | ||
var debug = (0, _debug.default)('date-duration'); | ||
var clone = function clone(value) { | ||
@@ -68,3 +72,6 @@ if ((0, _typeof2.default)(value) === 'object' && typeof value.toDate === 'function') { | ||
} else { | ||
date["set".concat(methods[key])](operator(date["get".concat(methods[key])](), key !== 'W' ? parts[key] : parts[key] * 7)); | ||
var original = date["get".concat(methods[key])](); | ||
var value = operator(original, key !== 'W' ? parts[key] : parts[key] * 7); | ||
date["set".concat(methods[key])](value); | ||
debug("set ".concat(key, " ").concat(original, " to ").concat(value, ": ").concat(date)); | ||
} | ||
@@ -71,0 +78,0 @@ }); |
{ | ||
"name": "date-duration", | ||
"version": "1.5.1", | ||
"version": "1.6.0", | ||
"description": "Manipulate Date objects with ISO 8601-formatted durations", | ||
@@ -54,3 +54,4 @@ "main": "dist/duration.js", | ||
"@babel/polyfill": "^7.2.5", | ||
"@babel/runtime": "^7.3.1" | ||
"@babel/runtime": "^7.3.1", | ||
"debug": "^4.1.1" | ||
}, | ||
@@ -57,0 +58,0 @@ "browserslist": [ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17251
145
3
+ Addeddebug@^4.1.1
+ Addeddebug@4.4.0(transitive)
+ Addedms@2.1.3(transitive)