JSPM

array-some

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q61503F
  • License

Array#some ponyfill for older browsers

Package Exports

  • array-some

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (array-some) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.