merge-timerange
Advanced tools
Comparing version 0.1.8 to 0.1.9
16
index.js
@@ -203,3 +203,6 @@ 'use strict'; | ||
// }, | ||
// nosort: Boolean | ||
// nosort: Boolean, | ||
// get: Boolean, | ||
// remove: Boolean, | ||
// overwrite: Boolean | ||
// } | ||
@@ -224,2 +227,5 @@ S.normalize = (arg) => spawn(function*() { | ||
yield Promise.all(ranges [map]((range, key) => spawn(function*() { | ||
//jshint maxcomplexity: 7 | ||
let starting = yield arg.Model.findOne( | ||
@@ -250,3 +256,3 @@ ({}) [extend](range.head) [extend]({end: {$gte: new Date(range.start - maxIntervalMsec)}}), | ||
S.mergeTimeranges({ | ||
if (!arg.get) S.mergeTimeranges({ | ||
maxInterval: arg.maxInterval, | ||
@@ -262,3 +268,3 @@ from: source, | ||
range.inserts = result [filter](item => { | ||
range.inserts = arg.get ? [] : result [filter](item => { | ||
let start = item.start - 0; | ||
@@ -272,3 +278,3 @@ let fItem = foundEnds[start]; | ||
range.removeCmds = foundEnds [map]((item, start) => ( | ||
range.removeCmds = arg.get ? [] : foundEnds [map]((item, start) => ( | ||
({}) [extend](range.head) | ||
@@ -281,3 +287,3 @@ [extend]({ | ||
range.removes = foundEnds [map](item => item.item); | ||
range.removes = arg.get ? [] : foundEnds [map](item => item.item); | ||
}))); | ||
@@ -284,0 +290,0 @@ |
{ | ||
"name": "merge-timerange", | ||
"version": "0.1.8", | ||
"version": "0.1.9", | ||
"description": "Merge time ranges", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
21347
601