Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

array-foreach

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array-foreach

Array#forEach ponyfill for older browsers

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.9K
decreased by-24.28%
Maintainers
1
Weekly downloads
 
Created
Source

array-foreach

Build Status NPM package Bower package Dependency Status License

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

EXAMPLE

var forEach = require('array-foreach');
var result = '';
forEach(['foo', 'bar', 'baz'], function (element, index, array) {
    result += element;
});
console.log(result); // 'foobarbaz'

INSTALL

via npm

Install

$ npm install --save array-foreach

Use

var forEach = require('array-foreach');

via bower

Install

$ bower install --save array-foreach

Load (forEach function is exported)

<script type="text/javascript" src="./path/to/bower_components/array-foreach/build/array-foreach.js"></script>

Use

var result = '';
forEach(['foo', 'bar', 'baz'], function (element, index, array) {
    result += element;
});

AUTHOR

LICENSE

Licensed under the MIT license.

Keywords

FAQs

Package last updated on 22 Mar 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc