@vect/vector
Advanced tools
Comparing version 0.0.10 to 0.0.11
@@ -5,4 +5,4 @@ 'use strict'; | ||
var vectorMapper = require('@vect/vector-mapper'); | ||
var vectorZipper = require('@vect/vector-zipper'); | ||
var Mappers = require('@vect/vector-mapper'); | ||
var Zippers = require('@vect/vector-zipper'); | ||
@@ -48,45 +48,12 @@ /** | ||
/** | ||
* zip two arrays, return the zipped array | ||
* @param {Array} a | ||
* @param {Array} b | ||
* @param {function(*,*,number?):*} zipper | ||
* @param {number} [l] | ||
* @returns {*[]} | ||
*/ | ||
const zip = (a, b, zipper, l) => { | ||
l = l || a && a.length; | ||
const v = Array(l); | ||
const mapper = Mappers.mapper; | ||
const mutate = Mappers.mutate; | ||
const zipper = Zippers.zipper; | ||
const mutazip = Zippers.mutazip; | ||
for (--l; l >= 0; l--) v[l] = zipper(a[l], b[l], l); | ||
return v; | ||
}; | ||
Object.defineProperty(exports, 'mapper', { | ||
enumerable: true, | ||
get: function () { | ||
return vectorMapper.mapper; | ||
} | ||
}); | ||
Object.defineProperty(exports, 'mutate', { | ||
enumerable: true, | ||
get: function () { | ||
return vectorMapper.mutate; | ||
} | ||
}); | ||
Object.defineProperty(exports, 'mutazip', { | ||
enumerable: true, | ||
get: function () { | ||
return vectorZipper.mutazip; | ||
} | ||
}); | ||
Object.defineProperty(exports, 'zipper', { | ||
enumerable: true, | ||
get: function () { | ||
return vectorZipper.zipper; | ||
} | ||
}); | ||
exports.copyMargin = copyMargin; | ||
exports.mapMargin = mapMargin; | ||
exports.zip = zip; | ||
exports.mapper = mapper; | ||
exports.mutate = mutate; | ||
exports.mutazip = mutazip; | ||
exports.zipper = zipper; |
@@ -1,3 +0,3 @@ | ||
export { mapper, mutate } from '@vect/vector-mapper'; | ||
export { mutazip, zipper } from '@vect/vector-zipper'; | ||
import { mapper as mapper$1, mutate as mutate$1 } from '@vect/vector-mapper'; | ||
import { zipper as zipper$1, mutazip as mutazip$1 } from '@vect/vector-zipper'; | ||
@@ -43,19 +43,7 @@ /** | ||
/** | ||
* zip two arrays, return the zipped array | ||
* @param {Array} a | ||
* @param {Array} b | ||
* @param {function(*,*,number?):*} zipper | ||
* @param {number} [l] | ||
* @returns {*[]} | ||
*/ | ||
const zip = (a, b, zipper, l) => { | ||
l = l || a && a.length; | ||
const v = Array(l); | ||
const mapper = mapper$1; | ||
const mutate = mutate$1; | ||
const zipper = zipper$1; | ||
const mutazip = mutazip$1; | ||
for (--l; l >= 0; l--) v[l] = zipper(a[l], b[l], l); | ||
return v; | ||
}; | ||
export { copyMargin, mapMargin, zip }; | ||
export { copyMargin, mapMargin, mapper, mutate, mutazip, zipper }; |
{ | ||
"name": "@vect/vector", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"description": "Util for array", | ||
@@ -14,4 +14,4 @@ "main": "dist/index.cjs.js", | ||
"dependencies": { | ||
"@vect/vector-mapper": "^0.0.10", | ||
"@vect/vector-zipper": "^0.0.10" | ||
"@vect/vector-mapper": "^0.0.11", | ||
"@vect/vector-zipper": "^0.0.11" | ||
}, | ||
@@ -36,3 +36,3 @@ "scripts": { | ||
"homepage": "https://github.com/hoyeungw/vect#readme", | ||
"gitHead": "72da22d4114e88ad3b3b5a8eb282871ad4bcc8ae" | ||
"gitHead": "64dd0e6461b71d49b41809f8ae7f3d7112f582e6" | ||
} |
5735
83
+ Added@vect/vector-mapper@0.0.11(transitive)
+ Added@vect/vector-zipper@0.0.11(transitive)
- Removed@vect/vector-mapper@0.0.10(transitive)
- Removed@vect/vector-zipper@0.0.10(transitive)
Updated@vect/vector-mapper@^0.0.11
Updated@vect/vector-zipper@^0.0.11