merge-timerange
Advanced tools
Comparing version 0.1.4 to 0.1.5
10
index.js
@@ -6,3 +6,3 @@ 'use strict'; | ||
values, clone, cloneDeep, forEach, extend, | ||
zipObject, pick, groupBy, fill, | ||
zipObject, pick, omit, groupBy, fill, | ||
mapValues, reduce, map, filter, flatten */ | ||
@@ -219,3 +219,3 @@ | ||
start: g1.start < g2.start ? g1.start : g2.start, | ||
end: g1.end < g2.end ? g2.end : g1.end | ||
end: g1.end > g2.end ? g1.end : g2.end | ||
}), {}) [extend]({head: group[0] [pick](arg.prop.head)})); | ||
@@ -225,3 +225,3 @@ | ||
let starting = yield arg.Model.findOne( | ||
({end: {$gte: new Date(range.start - maxIntervalMsec)}}) [extend](range.head), | ||
({}) [extend](range.head) [extend]({end: {$gte: new Date(range.start - maxIntervalMsec)}}), | ||
{_id: 0, start: 1} | ||
@@ -235,3 +235,3 @@ ).sort(sortByEnd).exec() [catchify](); | ||
let found = yield arg.Model.find( | ||
({start: startCond}) [extend](range.head), | ||
({}) [extend](range.head) [extend]({start: startCond}), | ||
{_id: 0, modifiedAt: 0} | ||
@@ -312,3 +312,3 @@ ).sort(sortByStart).exec() [catchify](); | ||
if (arg.removeCmds && arg.removeCmds.length) tasks.push( | ||
arg.Model.remove(arg.removeCmds) | ||
arg.Model.remove({$or: arg.removeCmds}) | ||
); | ||
@@ -315,0 +315,0 @@ |
{ | ||
"name": "merge-timerange", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"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
21107