@vect/vector-mapper
Advanced tools
Comparing version 0.0.30 to 0.1.0
@@ -8,5 +8,11 @@ 'use strict'; | ||
for (let i = 0; i < l; i++) fn.call(this, vec[i], l); | ||
for (let i = 0; i < l; i++) fn.call(this, vec[i], i); | ||
}; | ||
const reviter = function (vec, fn, l) { | ||
l = l || vec && vec.length; | ||
for (--l; l >= 0; l--) fn.call(this, vec[l], l); | ||
}; | ||
const mapper = function (vec, fn, l) { | ||
@@ -32,1 +38,2 @@ l = l || vec && vec.length; | ||
exports.mutate = mutate; | ||
exports.reviter = reviter; |
const iterate = function (vec, fn, l) { | ||
l = l || vec && vec.length; | ||
for (let i = 0; i < l; i++) fn.call(this, vec[i], l); | ||
for (let i = 0; i < l; i++) fn.call(this, vec[i], i); | ||
}; | ||
const reviter = function (vec, fn, l) { | ||
l = l || vec && vec.length; | ||
for (--l; l >= 0; l--) fn.call(this, vec[l], l); | ||
}; | ||
const mapper = function (vec, fn, l) { | ||
@@ -24,2 +30,2 @@ l = l || vec && vec.length; | ||
export { iterate, mapper, mutate }; | ||
export { iterate, mapper, mutate, reviter }; |
{ | ||
"name": "@vect/vector-mapper", | ||
"version": "0.0.30", | ||
"version": "0.1.0", | ||
"description": "A debugging tool", | ||
@@ -33,3 +33,3 @@ "main": "dist/index.cjs.js", | ||
"homepage": "https://github.com/hoyeungw/vect#readme", | ||
"gitHead": "472b46e1604977eb7c9e9bf583b557ebdc6786f3" | ||
"gitHead": "323ae45c212f75cb3b32244ec6b59cdca010b0b8" | ||
} |
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
4800
45