/ archiveofbelonging.org / back / node_modules / array.prototype.find /

[ICO]NameLast modifiedSizeDescription
[PARENTDIR]Parent Directory  -  
[DIR]tests/2 years ago -  
[TXT]CHANGELOG.md39 years ago2.0K 
[   ]LICENSE39 years ago1.1K7375cab EXHIBTION: fix overflow ellipsis cutoff [كارل مبارك]
[TXT]README.md39 years ago1.3Kf12eb36 documentaiton updates [كارل مبارك]
[   ]auto.js39 years ago 36  
[   ]implementation.js39 years ago740  
[   ]index.js39 years ago665  
[   ]package.json2 years ago2.2K7375cab EXHIBTION: fix overflow ellipsis cutoff [كارل مبارك]
[   ]polyfill.js39 years ago428  
[   ]shim.js39 years ago330  
README.md

Build Status

ES6 Array.prototype.find polyfill

Simple ES6 Array.prototype.find polyfill for older environments taken from es6-shim.

For browsers and node.js.

Installation

Usage

// as a function
var find = require('array.prototype.find');
find([1, 2], function (x) { return x === 2; }); // 2

// to shim it
require('array.prototype.find').shim();

Code example:

// Default:
[1, 5, 10, 15].find(function (a) { return a > 9; }) // 10

Acknowledgements

Tests, fixes and travis support added by _duncanhall

License

The MIT License (c) 2016 Paul Miller (http://paulmillr.com)

Apache/2.4.38 (Debian) Server at www.karls.computer Port 80