@f/foreach-obj

Iterate over an object

Stats

StarsIssuesVersionUpdatedCreatedSize
@f/foreach-obj
001.1.16 years ago6 years agoMinified + gzip package size for @f/foreach-obj in KB

Readme

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

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.