8000 GitHub - eduardomcv/slice-map: An implementation of slice + map done in a single iteration.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

eduardomcv/slice-map

Repository files navigation

An implementation of slice + map done in a single iteration.

Usage

const newArray = sliceMap({
  array,                    // the array to iterate over
  start: 1,                 // index where to start the slice (inclusive)
  end: 3,                   // index where to end the slice (non-inclusive)
  map(item, index, array) { // the mapping function applied to each array item
    // (...)
  }
})

About

An implementation of slice + map done in a single iteration.

Resources

Stars

Watchers

Forks

0