Package Exports
- @bemoje/arr-for-each-reverse
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@bemoje/arr-for-each-reverse) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@bemoje/arr-for-each-reverse
Iterate an array in reverse.
Version
Travis CI
Dependencies
Stats
Donate
Installation
npm install @bemoje/arr-for-each-reverse
npm install --save @bemoje/arr-for-each-reverse
npm install --save-dev @bemoje/arr-for-each-reverse
Usage
import arrForEachReverse from '@bemoje/arr-for-each-reverse'
const arr = ['a', 'b', 'c']
arrForEachReverse(arr, (element, index, array) => {
console.log({ element, index, array })
})
//=> { element: 'c', index: 2, array: [ 'a', 'b', 'c' ] }
//=> { element: 'b', index: 1, array: [ 'a', 'b', 'c' ] }
//=> { element: 'a', index: 0, array: [ 'a', 'b', 'c' ] }
Tests
Uses Jest to test module functionality. Run tests to get coverage details.
npm run test
API
arrForEachReverse
Iterate an array in reverse.
Parameters
Returns
void
callback
Type: Function