@f/foreach

Fast for each.

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
10Feb 24, 2016Nov 11, 2015Minified + gzip package size for @f/foreach in KB

Readme

foreach

Build status Git tag NPM version Code style

Fast for each.

Installation

$ npm install @f/foreach

Usage

var foreach = require('@f/foreach')

var obj = {a: 1, b: 2}
var copy = {}

foreach(function (val, key) {
  copy[key] = val
})

copy // => {a: 1, b: 2}

API

foreach(fn, obj)

  • fn - iterator
  • obj - object to iterate over

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.