@f/foreach-obj

1.1.1 • Public • Published

foreach-obj

Build status Git tag NPM version Code style

Iterate over an object.

Installation

$ npm install @f/foreach-obj

Usage

var forEach = require('@f/foreach-obj')

forEach(function (value, key, index) {
  // do something
}, { a: 1, b: 2 })

API

forEach(fn, obj)

  • fn(value, key, index) - Function you want to call for each element of the object. Called with the same context as forEach.
  • obj - The object you want to iterate over

Returns: void

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.1
    507
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.1
    507
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i @f/foreach-obj

Weekly Downloads

507

Version

1.1.1

License

MIT

Last publish

Collaborators

  • f