@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

Readme

Keywords

none

Package Sidebar

Install

npm i @f/foreach-obj

Weekly Downloads

555

Version

1.1.1

License

MIT

Last publish

Collaborators

  • f