@vect/vector
Advanced tools
Comparing version 0.2.10-alpha.0 to 0.2.10
@@ -5,5 +5,7 @@ 'use strict'; | ||
var Mapper = require('@vect/vector-mapper'); | ||
var Algebra = require('@vect/vector-algebra'); | ||
var Index = require('@vect/vector-index'); | ||
var Indicate = require('@vect/vector-indicator'); | ||
var Init = require('@vect/vector-init'); | ||
var Mapper = require('@vect/vector-mapper'); | ||
var Margin = require('@vect/vector-margin'); | ||
@@ -16,25 +18,27 @@ var Merge = require('@vect/vector-merge'); | ||
function _interopNamespace(e) { | ||
if (e && e.__esModule) { return e; } else { | ||
var n = Object.create(null); | ||
if (e) { | ||
Object.keys(e).forEach(function (k) { | ||
if (k !== 'default') { | ||
var d = Object.getOwnPropertyDescriptor(e, k); | ||
Object.defineProperty(n, k, d.get ? d : { | ||
enumerable: true, | ||
get: function () { | ||
return e[k]; | ||
} | ||
}); | ||
} | ||
}); | ||
} | ||
n['default'] = e; | ||
return Object.freeze(n); | ||
} | ||
if (e && e.__esModule) { return e; } else { | ||
var n = Object.create(null); | ||
if (e) { | ||
Object.keys(e).forEach(function (k) { | ||
if (k !== 'default') { | ||
var d = Object.getOwnPropertyDescriptor(e, k); | ||
Object.defineProperty(n, k, d.get ? d : { | ||
enumerable: true, | ||
get: function () { | ||
return e[k]; | ||
} | ||
}); | ||
} | ||
}); | ||
} | ||
n['default'] = e; | ||
return Object.freeze(n); | ||
} | ||
} | ||
var Mapper__namespace = /*#__PURE__*/_interopNamespace(Mapper); | ||
var Algebra__namespace = /*#__PURE__*/_interopNamespace(Algebra); | ||
var Index__namespace = /*#__PURE__*/_interopNamespace(Index); | ||
var Indicate__namespace = /*#__PURE__*/_interopNamespace(Indicate); | ||
var Init__namespace = /*#__PURE__*/_interopNamespace(Init); | ||
var Mapper__namespace = /*#__PURE__*/_interopNamespace(Mapper); | ||
var Margin__namespace = /*#__PURE__*/_interopNamespace(Margin); | ||
@@ -46,33 +50,2 @@ var Merge__namespace = /*#__PURE__*/_interopNamespace(Merge); | ||
const union = (a, b) => { | ||
const ve = a.slice(); | ||
Mapper.iterate(b, x => { | ||
if (!a.includes(x)) ve.push(x); | ||
}); | ||
return ve; | ||
}; | ||
const intersect = (a, b) => { | ||
const ve = []; | ||
Mapper.iterate(a, x => { | ||
if (b.includes(x)) ve.push(x); | ||
}); | ||
return ve; | ||
}; | ||
const difference = (a, b) => { | ||
const ve = []; | ||
Mapper.iterate(a, x => { | ||
if (!b.includes(x)) ve.push(x); | ||
}); | ||
return ve; | ||
}; | ||
var Algebra = /*#__PURE__*/Object.freeze({ | ||
__proto__: null, | ||
difference: difference, | ||
intersect: intersect, | ||
union: union | ||
}); | ||
const { | ||
@@ -128,6 +101,10 @@ iterate, | ||
const { | ||
union: union$1, | ||
intersect: intersect$1, | ||
difference: difference$1 | ||
} = Algebra; | ||
union, | ||
intersect, | ||
difference | ||
} = Algebra__namespace; | ||
const { | ||
first, | ||
last | ||
} = Index__namespace; | ||
@@ -142,9 +119,11 @@ exports.Duozipper = Duozipper; | ||
exports.acquire = acquire; | ||
exports.difference = difference$1; | ||
exports.difference = difference; | ||
exports.divide = divide; | ||
exports.draft = draft; | ||
exports.first = first; | ||
exports.init = init; | ||
exports.intersect = intersect$1; | ||
exports.intersect = intersect; | ||
exports.iso = iso; | ||
exports.iterate = iterate; | ||
exports.last = last; | ||
exports.leap = leap; | ||
@@ -169,3 +148,3 @@ exports.mapper = mapper; | ||
exports.splices = splices; | ||
exports.union = union$1; | ||
exports.union = union; | ||
exports.zipper = zipper; |
@@ -1,5 +0,6 @@ | ||
import * as Mapper from '@vect/vector-mapper'; | ||
import { iterate as iterate$1 } from '@vect/vector-mapper'; | ||
import * as Algebra from '@vect/vector-algebra'; | ||
import * as Index from '@vect/vector-index'; | ||
import * as Indicate from '@vect/vector-indicator'; | ||
import * as Init from '@vect/vector-init'; | ||
import * as Mapper from '@vect/vector-mapper'; | ||
import * as Margin from '@vect/vector-margin'; | ||
@@ -11,33 +12,2 @@ import * as Merge from '@vect/vector-merge'; | ||
const union = (a, b) => { | ||
const ve = a.slice(); | ||
iterate$1(b, x => { | ||
if (!a.includes(x)) ve.push(x); | ||
}); | ||
return ve; | ||
}; | ||
const intersect = (a, b) => { | ||
const ve = []; | ||
iterate$1(a, x => { | ||
if (b.includes(x)) ve.push(x); | ||
}); | ||
return ve; | ||
}; | ||
const difference = (a, b) => { | ||
const ve = []; | ||
iterate$1(a, x => { | ||
if (!b.includes(x)) ve.push(x); | ||
}); | ||
return ve; | ||
}; | ||
var Algebra = /*#__PURE__*/Object.freeze({ | ||
__proto__: null, | ||
difference: difference, | ||
intersect: intersect, | ||
union: union | ||
}); | ||
const { | ||
@@ -93,7 +63,11 @@ iterate, | ||
const { | ||
union: union$1, | ||
intersect: intersect$1, | ||
difference: difference$1 | ||
union, | ||
intersect, | ||
difference | ||
} = Algebra; | ||
const { | ||
first, | ||
last | ||
} = Index; | ||
export { Duozipper, Indicator, Max, Min, Piler, Quazipper, Trizipper, acquire, difference$1 as difference, divide, draft, init, intersect$1 as intersect, iso, iterate, leap, mapper, marginCopy, marginMapper, marginMutate, maxBy, merge, merges, minBy, mutate, mutazip, partition, range, reviter, select, selectEntry, seq, shuffle, splices, union$1 as union, zipper }; | ||
export { Duozipper, Indicator, Max, Min, Piler, Quazipper, Trizipper, acquire, difference, divide, draft, first, init, intersect, iso, iterate, last, leap, mapper, marginCopy, marginMapper, marginMutate, maxBy, merge, merges, minBy, mutate, mutazip, partition, range, reviter, select, selectEntry, seq, shuffle, splices, union, zipper }; |
{ | ||
"name": "@vect/vector", | ||
"version": "0.2.10-alpha.0", | ||
"version": "0.2.10", | ||
"description": "Util for array", | ||
@@ -14,10 +14,12 @@ "main": "dist/index.cjs.js", | ||
"dependencies": { | ||
"@vect/vector-indicator": "^0.2.10-alpha.0", | ||
"@vect/vector-init": "^0.2.10-alpha.0", | ||
"@vect/vector-mapper": "^0.2.10-alpha.0", | ||
"@vect/vector-margin": "^0.2.10-alpha.0", | ||
"@vect/vector-merge": "^0.2.10-alpha.0", | ||
"@vect/vector-select": "^0.2.10-alpha.0", | ||
"@vect/vector-update": "^0.2.10-alpha.0", | ||
"@vect/vector-zipper": "^0.2.10-alpha.0" | ||
"@vect/vector-algebra": "^0.2.10", | ||
"@vect/vector-index": "^0.2.10", | ||
"@vect/vector-indicator": "^0.2.10", | ||
"@vect/vector-init": "^0.2.10", | ||
"@vect/vector-mapper": "^0.2.10", | ||
"@vect/vector-margin": "^0.2.10", | ||
"@vect/vector-merge": "^0.2.10", | ||
"@vect/vector-select": "^0.2.10", | ||
"@vect/vector-update": "^0.2.10", | ||
"@vect/vector-zipper": "^0.2.10" | ||
}, | ||
@@ -42,3 +44,3 @@ "scripts": { | ||
"homepage": "https://github.com/hoyeungw/vect#readme", | ||
"gitHead": "eee0c345ff093b93debd1ed926eefe4a85b4cf66" | ||
"gitHead": "f39ccbcb4ec1372821d0117e147c445efaa6b02a" | ||
} |
8341
10
208
+ Added@vect/vector-algebra@^0.2.10
+ Added@vect/vector-index@^0.2.10
+ Added@vect/vector-algebra@0.2.13(transitive)
+ Added@vect/vector-index@0.2.13(transitive)
Updated@vect/vector-init@^0.2.10
Updated@vect/vector-mapper@^0.2.10
Updated@vect/vector-margin@^0.2.10
Updated@vect/vector-merge@^0.2.10
Updated@vect/vector-select@^0.2.10
Updated@vect/vector-update@^0.2.10
Updated@vect/vector-zipper@^0.2.10