JSPM

@bemoje/arr-for-each-reverse

1.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 9
  • Score
    100M100P100Q30921F
  • License MIT

Iterate an array in reverse.

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

NPM version

Travis CI

dependencies

Dependencies

dependencies

Stats

NPM downloads Forks

Buy Me A Beer donate button PayPal donate button

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

Parameters
  • element any The current element

  • index number The current element's index in the array

  • array Array The array