array-some

1.0.0 • Public • Published

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.

Package Sidebar

Install

npm i array-some

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • twada