
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
array-map-slice
Advanced tools
Allows to map a slice of the array for each item in the array.
const mapSlice = require('array-map-slice');
mapSlice([ 1, 2, 3 ], (slice, index, array) => {
return slice.join('-');
});
// => [ '1', '1-2', '1-2-3' ]
Or if you want to create slices from the right use mapSliceRight
:
const mapSlice = require('array-map-slice');
mapSlice.mapSliceRight([ 1, 2, 3 ], (slice, index, array) => {
return slice.join('-');
});
// => [ '1-2-3', '2-3', '3' ]
npm install array-map-slice
Returns a new array with values returned by the mapper function.
Type: Array
Iterated over in the mapper
function which gets splices of it.
Type: Function
Executed for every slice and expected to return the new value.
MIT © Florian Goße
FAQs
Allows to map a slice of the array for each item in the array.
The npm package array-map-slice receives a total of 4 weekly downloads. As such, array-map-slice popularity was classified as not popular.
We found that array-map-slice 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
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.