
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Faster, node.js focused alternative to JavaScript's native array map.
JavaScript's native Array.map()
is slow, and other popular array map libraries are focused on browser compatibility. This implementation is focused on node.js usage keeping it light and fast.
npm i arr-map --save
var map = require('arr-map');
map(['a', 'b', 'c'], function (ele) {
return ele + ele;
});
//=> ['aa', 'bb', 'cc']
map(['a', 'b', 'c'], function (ele, i) {
return i + ele;
});
//=> ['0a', '1b', '2c']
Install dev dependencies:
node i -d && npm benchmark
Benchmarks from March 24, 2015
#1: long.js
arr-map.js x 17,326 ops/sec ±0.74% (90 runs sampled)
array-map.js x 15,219 ops/sec ±0.72% (97 runs sampled)
native.js x 14,985 ops/sec ±0.66% (93 runs sampled)
#2: med.js
arr-map.js x 356,497 ops/sec ±0.79% (90 runs sampled)
array-map.js x 285,448 ops/sec ±0.78% (95 runs sampled)
native.js x 284,534 ops/sec ±0.82% (97 runs sampled)
#3: short.js
arr-map.js x 1,576,773 ops/sec ±0.72% (93 runs sampled)
array-map.js x 1,129,016 ops/sec ±0.67% (97 runs sampled)
native.js x 1,141,300 ops/sec ±0.71% (97 runs sampled)
Install dev dependencies.
npm i -d && npm test
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Jon Schlinkert
Copyright (c) 2015 Jon Schlinkert
Released under the MIT license
This file was generated by verb-cli on March 24, 2015.
FAQs
Faster, node.js focused alternative to JavaScript's native array map.
The npm package arr-map receives a total of 671,793 weekly downloads. As such, arr-map popularity was classified as popular.
We found that arr-map demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.