Array#forEach ponyfill for older browsers
npm install array-foreacharray-foreach
================================
[![Build Status][travis-image]][travis-url]
[![NPM package][npm-image]][npm-url]
[![Bower package][bower-image]][bower-url]
[![Dependency Status][depstat-image]][depstat-url]
[![License][license-image]][license-url]
Array#forEach ponyfill for older browsers
> Ponyfill: A polyfill that doesn't overwrite the native method
DESCRIPTION
---------------------------------------
Provides forEach function for older browsers, use native implememtation if exists.
It's just like
- array-map
- array-filter
- array-some
- array-reduce
- indexof
- object-assign
EXAMPLE
---------------------------------------
``javascript`
var forEach = require('array-foreach');
var result = '';
forEach(['foo', 'bar', 'baz'], function (element, index, array) {
result += element;
});
console.log(result); // 'foobarbaz'
INSTALL
---------------------------------------
Install
$ npm install --save array-foreach
Use
`javascript`
var forEach = require('array-foreach');
Install
$ bower install --save array-foreach
Load (forEach function is exported)
Use
`javascript``
var result = '';
forEach(['foo', 'bar', 'baz'], function (element, index, array) {
result += element;
});
AUTHOR
---------------------------------------
* Takuto Wada
LICENSE
---------------------------------------
Licensed under the MIT license.
[travis-url]: http://travis-ci.org/twada/array-foreach
[travis-image]: https://secure.travis-ci.org/twada/array-foreach.svg?branch=master
[npm-url]: https://npmjs.org/package/array-foreach
[npm-image]: https://badge.fury.io/js/array-foreach.svg
[bower-url]: http://badge.fury.io/bo/array-foreach
[bower-image]: https://badge.fury.io/bo/array-foreach.svg
[depstat-url]: https://gemnasium.com/twada/array-foreach
[depstat-image]: https://gemnasium.com/twada/array-foreach.svg
[license-url]: https://github.com/twada/array-foreach/blob/master/MIT-LICENSE
[license-image]: http://img.shields.io/badge/license-MIT-brightgreen.svg