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

array.prototype.find

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array.prototype.find - npm Package Compare versions

Comparing version 0.1.1 to 1.0.0

.travis.yml

5

bower.json
{
"name": "array.prototype.find",
"main": "index.js",
"version": "0.1.1",
"version": "1.0.0",
"homepage": "https://github.com/paulmillr/Array.prototype.find",
"authors": [
"Paul Miller <http://paulmillr.com>"
"Paul Miller <http://paulmillr.com>",
"Duncan Hall <http://duncanhall.net>"
],

@@ -9,0 +10,0 @@ "description": "Array.prototype.find ES6 polyfill.",

@@ -0,3 +1,10 @@

# 0.2.0
Add travis support
Add tests
Fix failing test: 'should work with an array-like object with negative length'
# 0.1.1
check if array#find already exists

2

component.json

@@ -5,3 +5,3 @@ {

"description": "Array.prototype.find ES6 polyfill.",
"version": "0.1.1",
"version": "1.0.0",
"keywords": ["Array.prototype.find", "find", "es6", "ecmascript 6", "polyfill"],

@@ -8,0 +8,0 @@ "dependencies": {},

// Array.prototype.find - MIT License (c) 2013 Paul Miller <http://paulmillr.com>
// For all details and docs: https://github.com/paulmillr/array.prototype.find
// Fixes and tests supplied by Duncan Hall <http://duncanhall.net>
(function(globals){

@@ -8,9 +9,9 @@ if (Array.prototype.find) return;

var list = Object(this);
var length = list.length >>> 0; // ES.ToUint32;
var length = list.length < 0 ? 0 : list.length >>> 0; // ES.ToUint32;
if (length === 0) return undefined;
if (typeof predicate !== 'function') {
if (typeof predicate !== 'function' || Object.prototype.toString.call(predicate) !== '[object Function]') {
throw new TypeError('Array#find: predicate must be a function');
}
var thisArg = arguments[1];
for (var i = 0, value; i < length && i in list; i++) {
for (var i = 0, value; i < length; i++) {
value = list[i];

@@ -17,0 +18,0 @@ if (predicate.call(thisArg, value, i, list)) return value;

{
"name": "array.prototype.find",
"version": "0.1.1",
"version": "1.0.0",
"description": "Array.prototype.find ES6 polyfill.",
"keywords": ["Array.prototype.find", "find", "es6", "ecmascript 6", "polyfill"],
"keywords": [
"Array.prototype.find",
"find",
"es6",
"ecmascript 6",
"polyfill"
],
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "mocha tests/*.js"
},

@@ -15,6 +21,16 @@ "repository": {

"author": "Paul Miller <http://paulmillr.com>",
"contributors": [
{
"name": "Duncan Hall",
"email": "himself@duncanhall.net"
}
],
"license": "MIT",
"bugs": {
"url": "https://github.com/paulmillr/Array.prototype.find/issues"
},
"devDependencies": {
"chai": "~1.9.1",
"mocha": "~1.21.4"
}
}

@@ -0,1 +1,3 @@

[![Build Status](https://travis-ci.org/duncanhall/Array.prototype.find.svg?branch=master)](https://travis-ci.org/duncanhall/Array.prototype.find)
# ES6 `Array.prototype.find` polyfill

@@ -41,2 +43,6 @@

## Acknowledgements
Tests, fixes and travis support added by [_duncanhall](http://twitter.com/_duncanhall)
## License

@@ -43,0 +49,0 @@

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