Socket
Socket
Sign inDemoInstall

array-some

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array-some

Array#some ponyfill for older browsers


Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

array-some

Build Status NPM package Bower package Dependency Status License

Array#some ponyfill for older browsers

Ponyfill: A polyfill that doesn't overwrite the native method

DESCRIPTION

Provides some function for older browsers, use native implememtation if exists.

It's just like

EXAMPLE

var some = require('array-some');
function isBiggerThan10 (element, index, array) {
    return element > 10;
}
some([2, 5, 8, 1, 4], isBiggerThan10);  // false
some([12, 5, 8, 1, 4], isBiggerThan10); // true

INSTALL

via npm

Install

$ npm install --save array-some

Use

var some = require('array-some');

via bower

Install

$ bower install --save array-some

Load (some function is exported)

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

Use

var result = some([2, 5, 8, 1, 4], function (element, index, array) {
    return element > 10;
});

AUTHOR

LICENSE

Licensed under the MIT license.

Keywords

FAQs

Package last updated on 09 Mar 2015

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