Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vect/vector-mapper

Package Overview
Dependencies
Maintainers
1
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vect/vector-mapper - npm Package Compare versions

Comparing version 0.0.23 to 0.0.24

25

dist/index.cjs.js

@@ -5,15 +5,13 @@ 'use strict';

const mapper = (ar, fn, l) => {
l = l || ar && ar.length;
const vec = Array(l);
const iterate = function (vec, fn, l) {
l = l || vec && vec.length;
for (--l; l >= 0; l--) vec[l] = fn(ar[l], l);
return vec;
for (let i = 0; i < l; i++) fn.call(this, vec[i], l);
};
const mutate = (ar, fn, l) => {
l = l || ar && ar.length;
const mapper = (vec, fn, l) => {
l = l || vec && vec.length;
const ar = Array(l);
for (--l; l >= 0; l--) ar[l] = fn(ar[l], l);
for (--l; l >= 0; l--) ar[l] = fn.call(undefined, vec[l], l);

@@ -23,3 +21,12 @@ return ar;

const mutate = (vec, fn, l) => {
l = l || vec && vec.length;
for (--l; l >= 0; l--) vec[l] = fn(vec[l], l);
return vec;
};
exports.iterate = iterate;
exports.mapper = mapper;
exports.mutate = mutate;

@@ -1,14 +0,12 @@

const mapper = (ar, fn, l) => {
l = l || ar && ar.length;
const vec = Array(l);
const iterate = function (vec, fn, l) {
l = l || vec && vec.length;
for (--l; l >= 0; l--) vec[l] = fn(ar[l], l);
return vec;
for (let i = 0; i < l; i++) fn.call(this, vec[i], l);
};
const mutate = (ar, fn, l) => {
l = l || ar && ar.length;
const mapper = (vec, fn, l) => {
l = l || vec && vec.length;
const ar = Array(l);
for (--l; l >= 0; l--) ar[l] = fn(ar[l], l);
for (--l; l >= 0; l--) ar[l] = fn.call(undefined, vec[l], l);

@@ -18,2 +16,10 @@ return ar;

export { mapper, mutate };
const mutate = (vec, fn, l) => {
l = l || vec && vec.length;
for (--l; l >= 0; l--) vec[l] = fn(vec[l], l);
return vec;
};
export { iterate, mapper, mutate };
{
"name": "@vect/vector-mapper",
"version": "0.0.23",
"version": "0.0.24",
"description": "A debugging tool",

@@ -33,3 +33,3 @@ "main": "dist/index.cjs.js",

"homepage": "https://github.com/hoyeungw/vect#readme",
"gitHead": "b066d81d335749f62bedda436d0fe7854e78c026"
"gitHead": "859849f307eddefac80bc064722d1816f2f930ad"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc