MCPcopy Create free account
hub / github.com/dataease/SQLBot / subtract

Method subtract

frontend/public/swagger-ui-bundle.js:26668–26684  ·  view source on GitHub ↗
(s, o)

Source from the content-addressed store, hash-verified

26666 )
26667 }
26668 subtract(s, o) {
26669 var _subtract = (s) => {
26670 for (var o = 0; o < this.ranges.length && !s.overlaps(this.ranges[o]); ) o++
26671 for (
26672 var i = this.ranges.slice(0, o);
26673 o < this.ranges.length && s.overlaps(this.ranges[o]);
26674 )
26675 ((i = i.concat(this.ranges[o].subtract(s))), o++)
26676 ;((this.ranges = i.concat(this.ranges.slice(o))), this._update_length())
26677 }
26678 return (
26679 s instanceof DRange
26680 ? s.ranges.forEach(_subtract)
26681 : (null == o && (o = s), _subtract(new SubRange(s, o))),
26682 this
26683 )
26684 }
26685 intersect(s, o) {
26686 var i = [],
26687 _intersect = (s) => {

Callers 2

_expandMethod · 0.45
_subtractMethod · 0.45

Calls 1

forEachMethod · 0.45

Tested by

no test coverage detected