
Security News
Open Source CAI Framework Handles Pen Testing Tasks up to 3,600× Faster Than Humans
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
map-iterable
Advanced tools
Array.prototype.map analog for iterables.
The map() method creates a new iterable with the results of calling a provided function on every element in given iterable.
You can omit the data argument and you get a function that map over the provided function.
npm install --save map-iterable
const map = require("map-iterable");
const numbers = [1, 4, 9];
const roots = Array.from(map(Math.sqrt, numbers));
// roots is now [1, 2, 3], numbers is still [1, 4, 9]
using partial apply
const map = require("map-iterable");
const mapSqrt = map(Math.sqrt);
const numbers = [1, 4, 9];
cons;
const roots = Array.from(mapSqrt(numbers));
// roots is now [1, 2, 3], numbers is still [1, 4, 9]
Creates a new iterable with the results of calling transform
function on every
element in data
iterable. If you omit the data argument return a unary
function that accept the data argument and map over the provided function.
Parameters
transform
Function
a function that return an element of the new Iterable, receiving as arguments:
. currentValue - The current element being processed in the iterable. index -
The index of the current element being processed in the iterable.data
Iterable The source iterable to iterate over.Returns Iterable A new Iterable over results of the transform function.
The MIT License (MIT)
© 2017 Andrea Parodi
FAQs
Array.prototype.map analog for iterables.
The npm package map-iterable receives a total of 4,421 weekly downloads. As such, map-iterable popularity was classified as popular.
We found that map-iterable 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
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.