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

array-some-x

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array-some-x - npm Package Compare versions

Comparing version 3.1.0 to 3.1.1

105

dist/array-some-x.esm.js

@@ -7,10 +7,14 @@ import attempt from 'attempt-x';

import toBoolean from 'to-boolean-x';
import methodize from 'simple-methodize-x';
import call from 'simple-call-x';
var ns = [].some;
var nativeSome = typeof ns === 'function' && ns;
var nativeSome = typeof ns === 'function' && methodize(ns);
var test1 = function test1() {
var spy = 0;
var res = attempt.call([1, 2], nativeSome, function spyAdd1(item) {
spy += item;
return false;
var res = attempt(function attemptee() {
return nativeSome([1, 2], function spyAdd1(item) {
spy += item;
return false;
});
});

@@ -22,5 +26,7 @@ return res.threw === false && res.value === false && spy === 3;

var spy = '';
var res = attempt.call(toObject('abc'), nativeSome, function spyAdd2(item, index) {
spy += item;
return index === 1;
var res = attempt(function attemptee() {
return nativeSome(toObject('abc'), function spyAdd2(item, index) {
spy += item;
return index === 1;
});
});

@@ -32,8 +38,12 @@ return res.threw === false && res.value === true && spy === 'ab';

var spy = 0;
var res = attempt.call(function getArgs() {
/* eslint-disable-next-line prefer-rest-params */
return arguments;
}(1, 2, 3), nativeSome, function spyAdd3(item, index) {
spy += item;
return index === 2;
var res = attempt(function attemptee() {
var args = function getArgs() {
/* eslint-disable-next-line prefer-rest-params */
return arguments;
}(1, 2, 3);
return nativeSome(args, function spyAdd3(item, index) {
spy += item;
return index === 2;
});
});

@@ -45,11 +55,13 @@ return res.threw === false && res.value === true && spy === 6;

var spy = 0;
var res = attempt.call({
0: 1,
1: 2,
3: 3,
4: 4,
length: 4
}, nativeSome, function spyAdd4(item) {
spy += item;
return false;
var res = attempt(function attemptee() {
return nativeSome({
0: 1,
1: 2,
3: 3,
4: 4,
length: 4
}, function spyAdd4(item) {
spy += item;
return false;
});
});

@@ -59,5 +71,5 @@ return res.threw === false && res.value === false && spy === 6;

var doc = typeof document !== 'undefined' && document;
var test5 = function test5() {
var doc = typeof document !== 'undefined' && document;
if (doc) {

@@ -68,5 +80,7 @@ var spy = null;

fragment.appendChild(div);
var res = attempt.call(fragment.childNodes, nativeSome, function spyAssign(item) {
spy = item;
return item;
var res = attempt(function attemptee() {
return nativeSome(fragment.childNodes, function spyAssign(item) {
spy = item;
return item;
});
});

@@ -79,8 +93,8 @@ return res.threw === false && res.value === true && spy === div;

var isStrict = function getIsStrict() {
/* eslint-disable-next-line babel/no-invalid-this */
return toBoolean(this) === false;
}();
var test6 = function test6() {
var isStrict = function getIsStrict() {
/* eslint-disable-next-line babel/no-invalid-this */
return toBoolean(this) === false;
}();
if (isStrict) {

@@ -94,3 +108,5 @@ var spy = null;

var res = attempt.call([1], nativeSome, thisTest, 'x');
var res = attempt(function attemptee() {
return nativeSome([1], thisTest, 'x');
});
return res.threw === false && res.value === false && spy === true;

@@ -104,6 +120,7 @@ }

var spy = {};
var fn = 'return nativeSome.call("foo", function (_, __, context) {' + 'if (castBoolean(context) === false || typeof context !== "object") {' + 'spy.value = true;}});';
/* eslint-disable-next-line no-new-func */
var res = attempt(Function('nativeSome', 'spy', 'castBoolean', fn), nativeSome, spy, toBoolean);
var fn = 'return nativeSome("foo", function (_, __, context) {' + 'if (castBoolean(context) === false || typeof context !== "object") {' + 'spy.value = true;}});';
var res = attempt(function attemptee() {
/* eslint-disable-next-line no-new-func */
return Function('nativeSome', 'spy', 'castBoolean', fn)(nativeSome, spy, toBoolean);
});
return res.threw === false && res.value === false && spy.value !== true;

@@ -113,2 +130,3 @@ };

var isWorking = toBoolean(nativeSome) && test1() && test2() && test3() && test4() && test5() && test6() && test7();
console.log(isWorking);

@@ -118,11 +136,4 @@ var patchedSome = function some(array, callBack

) {
requireObjectCoercible(array);
var args = [assertIsFunction(callBack)];
if (arguments.length > 2) {
/* eslint-disable-next-line prefer-rest-params,prefer-destructuring */
args[1] = arguments[2];
}
return nativeSome.apply(array, args);
/* eslint-disable-next-line prefer-rest-params */
return nativeSome(requireObjectCoercible(array), assertIsFunction(callBack), arguments[2]);
}; // ES5 15.4.4.17

@@ -147,3 +158,3 @@ // http://es5.github.com/#x15.4.4.17

/* eslint-disable-next-line prefer-rest-params,babel/no-invalid-this */
if (callBack.call(this, arguments[0], i, object)) {
if (call(callBack, this, [arguments[0], i, object])) {
return true;

@@ -150,0 +161,0 @@ }

@@ -5,18 +5,12 @@ /*!

"copywrite": "Copyright (c) 2017",
"date": "2019-08-14T15:44:04.422Z",
"date": "2019-08-20T20:10:27.795Z",
"describe": "",
"description": "Tests whether some element passes the provided function.",
"file": "array-some-x.min.js",
"hash": "5d52af345b64b7c067de",
"hash": "af72d8b32f367d0b3788",
"license": "MIT",
"version": "3.1.0"
"version": "3.1.1"
}
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.arraySomeX=t():e.arraySomeX=t()}(function(){"use strict";var e,t={}.constructor,n=t.prototype,r=t.defineProperty,o=function(){return"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0},i=function(){return this};try{return r?r(n,"$$globalThis$$",{get:i,configurable:!0}):n.__defineGetter__("$$globalThis$$",i),e="undefined"==typeof $$globalThis$$?o():$$globalThis$$,delete n.$$globalThis$$,e}catch(e){return o()}}(),function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)}([function(e,t,n){"use strict";var r=Object.prototype.toString;if(n(4)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;e.exports=function(e){if("symbol"==typeof e)return!0;if("[object Symbol]"!==r.call(e))return!1;try{return function(e){return"symbol"==typeof e.valueOf()&&i.test(o.call(e))}(e)}catch(e){return!1}}}else e.exports=function(e){return!1}},function(e,t,n){"use strict";
/*!
* is-primitive <https://github.com/jonschlinkert/is-primitive>
*
* Copyright (c) 2014-present, Jon Schlinkert.
* Released under the MIT License.
*/e.exports=function(e){return"object"==typeof e?null===e:"function"!=typeof e}},function(e,t,n){"use strict";var r=Date.prototype.getDay,o=Object.prototype.toString,i="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;e.exports=function(e){return"object"==typeof e&&null!==e&&(i?function(e){try{return r.call(e),!0}catch(e){return!1}}(e):"[object Date]"===o.call(e))}},function(e,t,n){"use strict";var r=String.prototype.valueOf,o=Object.prototype.toString,i="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;e.exports=function(e){return"string"==typeof e||"object"==typeof e&&(i?function(e){try{return r.call(e),!0}catch(e){return!1}}(e):"[object String]"===o.call(e))}},function(e,t,n){"use strict";(function(t){var r=t.Symbol,o=n(6);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}}).call(this,n(5))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},function(e,t,n){"use strict";n.r(t);var r=function(e){try{for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return{threw:!1,value:e.apply(this,n)}}catch(e){return{threw:!0,value:e}}},o=function(e){return null==e},i=function(e){if(o(e))throw new TypeError("Cannot call method on ".concat(e));return e},c={}.constructor,u=function(e){return c(i(e))},s=function(e){return!!e},a={}.toString,f=function(e){return null===e?"[object Null]":void 0===e?"[object Undefined]":a.call(e)},l=n(0),p=n.n(l);for(var y=r(function(){return function(e,t){if(e!==t)throw new TypeError("Cannot instantiate an arrow function")}(this,void 0),"function"==typeof Symbol&&p()(Symbol(""))}.bind(void 0)),d=!1===y.threw&&!0===y.value,b=d&&p()(Symbol.toStringTag),g=n(1),v=n.n(g),m="Cannot convert a Symbol value to a string",h=m.constructor,w=function(e){if(p()(e))throw new TypeError(m);return h(e)},S=function(e){return w(i(e))},j=[{code:9,description:"Tab",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\t"},{code:10,description:"Line Feed",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\n"},{code:11,description:"Vertical Tab",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\v"},{code:12,description:"Form Feed",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\f"},{code:13,description:"Carriage Return",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\r"},{code:32,description:"Space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:160,description:"No-break space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:5760,description:"Ogham space mark",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:6158,description:"Mongolian vowel separator",es5:!0,es2015:!0,es2016:!0,es2017:!1,es2018:!1,string:"᠎"},{code:8192,description:"En quad",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8193,description:"Em quad",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8194,description:"En space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8195,description:"Em space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8196,description:"Three-per-em space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8197,description:"Four-per-em space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8198,description:"Six-per-em space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8199,description:"Figure space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8200,description:"Punctuation space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8201,description:"Thin space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8202,description:"Hair space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8232,description:"Line separator",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\u2028"},{code:8233,description:"Paragraph separator",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\u2029"},{code:8239,description:"Narrow no-break space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8287,description:"Medium mathematical space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:12288,description:"Ideographic space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:65279,description:"Byte Order Mark",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\ufeff"}],O="",x=j.length,T=0;T<x;T+=1)j[T].es2016&&j[T].string,j[T].es2018&&(O+=j[T].string);var $=O,P=new(0,/none/.constructor)("^[".concat($,"]+")),E="".replace,_=function(e){return E.call(S(e),P,"")},F=new(0,/none/.constructor)("[".concat($,"]+$")),N="".replace,M=function(e){return N.call(S(e),F,"")},C=function(e){return _(M(e))},k=new(0,/none/.constructor)("[".concat($,"]+"),"g"),D=" ".replace,A=function(e){return D.call(C(e),k," ")},I=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,B="".replace,X=function(e,t){return B.call(S(e),I,arguments.length>1?w(t):"")},q=r.constructor,G=r.toString,L=/^class /,H=L.test,R=!1===r(function(){return q('"use strict"; return class My {};')()}).threw,U=function(e){return H.call(L,A(X(G.call(e)," ")))},V=function(e){var t=r(U,e);return!1===t.threw&&t.value},z=function(e,t){return!v()(e)&&(b?function(e,t){return!(R&&!1===t&&V(e)||!1!==r.call(e,G).threw)}(e,s(t)):(!R||!1!==s(t)||!V(e))&&function(e){var t=f(e);return"[object Function]"===t||"[object GeneratorFunction]"===t||"[object AsyncFunction]"===t}(e))},J=d&&Symbol.prototype.toString,K="function"==typeof J&&p.a,Q="".constructor,W=function(e){return K&&K(e)?J.call(e):Q(e)},Y=function(e,t){if(!1===z(e)){var n=arguments.length>1?W(t):"".concat(v()(e)?W(e):"#<Object>"," is not a function");throw new TypeError(n)}return e},Z=n(2),ee=n.n(Z),te="string".constructor,ne=(0).constructor,re=d&&Symbol.toPrimitive,oe=d&&Symbol.prototype.valueOf,ie=["toString","valueOf"],ce=["valueOf","toString"],ue=function(e,t){i(e),function(e){if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"')}(t);for(var n,r,o="string"===t?ie:ce,c=0;c<2;c+=1)if(n=e[o[c]],z(n)&&(r=n.call(e),v()(r)))return r;throw new TypeError("No default value")},se=function(e,t){if(t){if(e===te)return"string";if(e===ne)return"number"}return"default"},ae=function(e){if(d){if(re)return function(e,t){var n=e[t];if(!1===o(n)){if(!1===z(n))throw new TypeError("".concat(n," returned for property ").concat(t," of object ").concat(e," is not a function"));return n}}(e,re);if(p()(e))return oe}},fe=function(e){var t=e.exoticToPrim,n=e.input,r=e.hint,o=t.call(n,r);if(v()(o))return o;throw new TypeError("unable to convert exotic object to primitive")},le=function(e,t){var n="default"===t&&(ee()(e)||p()(e))?"string":t;return ue(e,"default"===n?"number":n)},pe=function(e,t){if(v()(e))return e;var n=se(t,arguments.length>1),r=ae(e);return void 0===r?le(e,n):fe({exoticToPrim:r,input:e,hint:n})},ye=parseInt,de=(0).constructor,be="".charAt,ge=/^[-+]?0[xX]/,ve=ge.test,me=function(e,t){var n=_(w(e));return"᠎"===be.call(n,0)?NaN:ye(n,de(t)||(ve.call(ge,n)?16:10))},he=2..constructor,we="Cannot convert a Symbol value to a number".slice,Se=/^0b[01]+$/i,je=Se.test,Oe=/^0o[0-7]+$/i,xe=new(0,Se.constructor)("[…᠎​￾]","g"),Te=/^[-+]0x[0-9a-f]+$/i,$e=function(e,t){return me(we.call(e,2),t)},Pe=function(e,t){return function(e){return je.call(Se,e)}(t)?e($e(t,2)):function(e){return je.call(Oe,e)}(t)?e($e(t,8)):null},Ee=function(e,t){var n=Pe(e,t);if(null!==n)return n;if(function(e){return je.call(xe,e)}(t)||function(e){return je.call(Te,e)}(t))return NaN;var r=C(t);return r!==t?e(r):null},_e=function e(t){var n=function(e){if(p()(e))throw new TypeError("Cannot convert a Symbol value to a number");return e}(pe(t,he));if("string"==typeof n){var r=Ee(e,n);if(null!==r)return r}return he(n)},Fe=function(e){return e!=e},Ne=function(e){return"number"==typeof e&&!1===Fe(e)&&e!==1/0&&e!==-1/0},Me=function(e){var t=_e(e);return 0===t||Fe(t)?t:t>0?1:-1},Ce=Math.abs,ke=Math.floor,De=function(e){var t=_e(e);return Fe(t)?0:0===t||!1===Ne(t)?t:Me(t)*ke(Ce(t))},Ae=function(e){var t=De(e);return t<=0?0:t>9007199254740991?9007199254740991:t},Ie={}.constructor("a"),Be="a"===Ie[0]&&0 in Ie,Xe=n(3),qe="".split,Ge=!1===Be&&"function"==typeof qe&&n.n(Xe).a,Le=function(e){return Ge&&Ge(e)?qe.call(e,""):e};function He(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var c,u=e[Symbol.iterator]();!(r=(c=u.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Re=function(e){var t=He(e,6),n=t[0],r=t[1],o=t[2],i=t[3],c=t[4],u=t[5],s=i[c];return n?o(s,c,u):o.call(r,s,c,u)},Ue=function(e){var t=Le(e);return[t,Ae(t.length)]},Ve=function(e,t){var n=u(e);Y(t);var r=Ue(n),o=He(r,2),i=o[0],c=o[1],s=arguments.length>2?arguments[2]:void 0,a=void 0===s;if(c)for(var f=0;f<c;f+=1)if(Re([a,s,t,i,f,n]))return!0;return!1};n.d(t,"implementation",function(){return Ye});var ze,Je,Ke=[].some,Qe="function"==typeof Ke&&Ke,We=s(Qe)&&(ze=0,!1===(Je=r.call([1,2],Qe,function(e){return ze+=e,!1})).threw&&!1===Je.value&&3===ze)&&function(){var e="",t=r.call(u("abc"),Qe,function(t,n){return e+=t,1===n});return!1===t.threw&&!0===t.value&&"ab"===e}()&&function(){var e=0,t=r.call(function(){return arguments}(1,2,3),Qe,function(t,n){return e+=t,2===n});return!1===t.threw&&!0===t.value&&6===e}()&&function(){var e=0,t=r.call({0:1,1:2,3:3,4:4,length:4},Qe,function(t){return e+=t,!1});return!1===t.threw&&!1===t.value&&6===e}()&&function(){var e="undefined"!=typeof document&&document;if(e){var t=null,n=e.createDocumentFragment(),o=e.createElement("div");n.appendChild(o);var i=r.call(n.childNodes,Qe,function(e){return t=e,e});return!1===i.threw&&!0===i.value&&t===o}return!0}()&&function(){if(function(){return!1===s(this)}()){var e=null,t=r.call([1],Qe,function(){e="string"==typeof this},"x");return!1===t.threw&&!1===t.value&&!0===e}return!0}()&&function(){var e={},t=r(Function("nativeSome","spy","castBoolean",'return nativeSome.call("foo", function (_, __, context) {if (castBoolean(context) === false || typeof context !== "object") {spy.value = true;}});'),Qe,e,s);return!1===t.threw&&!1===t.value&&!0!==e.value}(),Ye=function(e,t){var n=u(e);Y(t);var r=function(){var e=arguments[1];return!!(e in arguments[2]&&t.call(this,arguments[0],e,n))};return Ve(n,r,arguments[2])},Ze=We?function(e,t){i(e);var n=[Y(t)];return arguments.length>2&&(n[1]=arguments[2]),Qe.apply(e,n)}:Ye;t.default=Ze}])});
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.arraySomeX=n():t.arraySomeX=n()}(function(){"use strict";var t,n={}.constructor,e=n.prototype,r=n.defineProperty,o=function(){return"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0},i=function(){return this};try{return r?r(e,"$$globalThis$$",{get:i,configurable:!0}):e.__defineGetter__("$$globalThis$$",i),t="undefined"==typeof $$globalThis$$?o():$$globalThis$$,delete e.$$globalThis$$,t}catch(t){return o()}}(),function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=6)}([function(t,n,e){"use strict";var r=Object.prototype.toString;if(e(3)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==r.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},function(t,n,e){"use strict";var r=String.prototype.valueOf,o=Object.prototype.toString,i="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;t.exports=function(t){return"string"==typeof t||"object"==typeof t&&(i?function(t){try{return r.call(t),!0}catch(t){return!1}}(t):"[object String]"===o.call(t))}},function(t,n,e){"use strict";var r=Date.prototype.getDay,o=Object.prototype.toString,i="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return r.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},function(t,n,e){"use strict";(function(n){var r=n.Symbol,o=e(5);t.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}}).call(this,e(4))},function(t,n){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,n,e){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},n=Symbol("test"),e=Object(n);if("string"==typeof n)return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;for(n in t[n]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var r=Object.getOwnPropertySymbols(t);if(1!==r.length||r[0]!==n)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,n);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},function(t,n,e){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}e.r(n);var o=function(t){return"object"===r(t)?null===t:"function"!=typeof t},i=e(1),u=e.n(i),c={}.constructor("a"),s="a"===c[0]&&0 in c,f=function(){}.bind,a="function"==typeof f&&function(){var t=null,n=null,e=null,r=[];try{var o=f.apply(function(r,o){return e=this,t=r,n=o,arguments},[r,1]),i=o(2);return 1===o.length&&2===i.length&&1===t&&2===n&&e===r}catch(t){return!1}}()&&function(){var t=null,n=null,e=null,r=[1,2,3],o=function(o,i){return t=o,n=i,e=this,r};try{var i=f.apply(o,[null]),u=new i(1,2);return i.length===o.length&&u===r&&1===t&&2===n&&e!==r}catch(t){return!1}}(),l="".split,p=Math.max,y=o.bind,d=o.call,b=a?y.call(d,l):function(t,n){return l.call(t,n)},g=function(t){return u()(t)?b(t,""):t},v=function(t,n){var e=arguments.length>2?arguments[2]:[];if("string"!=typeof t&&o(t))return e;for(var r=s?t:g(t),i=r.length,u=p(0,n)||0;u<i;u+=1)e[e.length]=t[u];return e};function h(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=[],r=!0,o=!1,i=void 0;try{for(var u,c=t[Symbol.iterator]();!(r=(u=c.next()).done)&&(e.push(u.value),!n||e.length!==n);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return e}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var m=v.bind,w=v.call,S={},j=S.constructor,O=S.toString,T=function(t,n){return t>=n?t:n},x=function(t){if("function"!=typeof t&&"[object Function]"!==O.apply(t))throw new TypeError("bind called on incompatible "+t)},$=[function(t){return function(){return t.apply(this,v(arguments))}},function(t,n){return function(e){return t.apply(this,v(arguments,n,[e]))}},function(t,n){return function(e,r){return t.apply(this,v(arguments,n,[e,r]))}},function(t,n){return function(e,r,o){return t.apply(this,v(arguments,n,[e,r,o]))}},function(t,n){return function(e,r,o,i){return t.apply(this,v(arguments,n,[e,r,o,i]))}},function(t,n){return function(e,r,o,i,u){return t.apply(this,v(arguments,n,[e,r,o,i,u]))}},function(t,n){return function(e,r,o,i,u,c){return t.apply(this,v(arguments,n,[e,r,o,i,u,c]))}},function(t,n){return function(e,r,o,i,u,c,s){return t.apply(this,v(arguments,n,[e,r,o,i,u,c,s]))}},function(t,n){return function(e,r,o,i,u,c,s,f){return t.apply(this,v(arguments,n,[e,r,o,i,u,c,s,f]))}}],E=function(t){var n=h(t,3),e=n[0],r=n[1],o=n[2],i=T(0,r.length-T(0,o.length-2)),u=$[i],c=u?u(e,i):$[0](e);if(r.prototype){var s=function(){};s.prototype=r.prototype,c.prototype=new s,s.prototype=null}return c},P=function(t,n){var e=t.apply(this,n);return j(e)===e?e:this},F=a?w.bind(m):function(t,n){x(t);var e,r=arguments,o=function(){var o=v(arguments,0,v(r,2));return this instanceof e?P.apply(this,[t,o]):t.apply(n,o)};return e=E([o,t,r])},_=TypeError,M=F.apply,N=F(F.call,M),C=F(M,{}.toString),k=function(t){if("function"!=typeof t&&"[object Function]"!==C(t))throw new _(t+" is not a function");return t},D=function(t,n){return N(k(t),n,v(arguments[2]))},A=function(t){try{return{threw:!1,value:D(t,this,v(arguments,1))}}catch(t){return{threw:!0,value:t}}},I=function(t){return null==t},B=function(t){if(I(t))throw new TypeError("Cannot call method on ".concat(t));return t},X={}.constructor,q=function(t){return X(B(t))},G=function(t){return!!t},L={}.toString,z=function(t){return function(t){if("function"!=typeof t&&"[object Function]"!==D(L,t))throw new TypeError("methodize called on incompatible "+t)}(t),function(){return D(t,arguments[0],v(arguments,1))}},H=z({}.toString),R=function(t){return null===t?"[object Null]":void 0===t?"[object Undefined]":H(t)},U=e(0),V=e.n(U);for(var J=A(function(){return function(t,n){if(t!==n)throw new TypeError("Cannot instantiate an arrow function")}(this,void 0),"function"==typeof Symbol&&V()(Symbol(""))}.bind(void 0)),K=!1===J.threw&&!0===J.value,Q=K&&V()(Symbol.toStringTag),W="Cannot convert a Symbol value to a string".constructor,Y=function(t){if(V()(t))throw new TypeError("Cannot convert a Symbol value to a string");return W(t)},Z=function(t){return Y(B(t))},tt=[{code:9,description:"Tab",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\t"},{code:10,description:"Line Feed",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\n"},{code:11,description:"Vertical Tab",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\v"},{code:12,description:"Form Feed",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\f"},{code:13,description:"Carriage Return",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\r"},{code:32,description:"Space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:160,description:"No-break space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:5760,description:"Ogham space mark",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:6158,description:"Mongolian vowel separator",es5:!0,es2015:!0,es2016:!0,es2017:!1,es2018:!1,string:"᠎"},{code:8192,description:"En quad",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8193,description:"Em quad",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8194,description:"En space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8195,description:"Em space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8196,description:"Three-per-em space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8197,description:"Four-per-em space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8198,description:"Six-per-em space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8199,description:"Figure space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8200,description:"Punctuation space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8201,description:"Thin space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8202,description:"Hair space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8232,description:"Line separator",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\u2028"},{code:8233,description:"Paragraph separator",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\u2029"},{code:8239,description:"Narrow no-break space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8287,description:"Medium mathematical space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:12288,description:"Ideographic space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:65279,description:"Byte Order Mark",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\ufeff"}],nt="",et=tt.length,rt=0;rt<et;rt+=1)tt[rt].es2016&&tt[rt].string,tt[rt].es2018&&(nt+=tt[rt].string);var ot=nt,it=new(0,/none/.constructor)("^[".concat(ot,"]+")),ut=z("".replace),ct=function(t){return ut(Z(t),it,"")},st=new(0,/none/.constructor)("[".concat(ot,"]+$")),ft=z("".replace),at=function(t){return ft(Z(t),st,"")},lt=function(t){return ct(at(t))},pt=new(0,/none/.constructor)("[".concat(ot,"]+"),"g"),yt=z(" ".replace),dt=function(t){return yt(lt(t),pt," ")},bt=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,gt=z("".replace),vt=function(t,n){return gt(Z(t),bt,arguments.length>1?Y(n):"")},ht=A.constructor,mt=z(A.toString),wt=/^class /,St=z(wt.test),jt=!1===A(function(){return ht('"use strict"; return class My {};')()}).threw,Ot=function(t){return St(wt,dt(vt(mt(t)," ")))},Tt=function(t){var n=A(Ot,t);return!1===n.threw&&n.value},xt=function(t,n){return!o(t)&&(Q?function(t,n){return!(jt&&!1===n&&Tt(t)||!1!==A(function(){return mt(t)}).threw)}(t,G(n)):(!jt||!1!==G(n)||!Tt(t))&&function(t){var n=R(t);return"[object Function]"===n||"[object GeneratorFunction]"===n||"[object AsyncFunction]"===n}(t))},$t=K&&Symbol.prototype.toString,Et="function"==typeof $t&&V.a,Pt="".constructor,Ft=function(t){return Et&&Et(t)?$t.call(t):Pt(t)},_t=function(t,n){if(!1===xt(t)){var e=arguments.length>1?Ft(n):"".concat(o(t)?Ft(t):"#<Object>"," is not a function");throw new TypeError(e)}return t},Mt=e(2),Nt=e.n(Mt),Ct="string".constructor,kt=(0).constructor,Dt=K&&Symbol.toPrimitive,At=K&&Symbol.prototype.valueOf,It=["toString","valueOf"],Bt=["valueOf","toString"],Xt=function(t,n){B(t),function(t){if("string"!=typeof t||"number"!==t&&"string"!==t)throw new TypeError('hint must be "string" or "number"')}(n);for(var e="string"===n?It:Bt,r=0;r<2;r+=1){var i=t[e[r]];if(xt(i)){var u=D(i,t);if(o(u))return u}}throw new TypeError("No default value")},qt=function(t,n){if(n){if(t===Ct)return"string";if(t===kt)return"number"}return"default"},Gt=function(t){if(K){if(Dt)return function(t,n){var e=t[n];if(!1===I(e)){if(!1===xt(e))throw new TypeError("".concat(e," returned for property ").concat(n," of object ").concat(t," is not a function"));return e}}(t,Dt);if(V()(t))return At}},Lt=function(t){var n=t.exoticToPrim,e=t.input,r=t.hint,i=D(n,e,[r]);if(o(i))return i;throw new TypeError("unable to convert exotic object to primitive")},zt=function(t,n){var e="default"===n&&(Nt()(t)||V()(t))?"string":n;return Xt(t,"default"===e?"number":e)},Ht=function(t,n){if(o(t))return t;var e=qt(n,arguments.length>1),r=Gt(t);return void 0===r?zt(t,e):Lt({exoticToPrim:r,input:t,hint:e})},Rt=parseInt,Ut=(0).constructor,Vt=z("᠎".charAt),Jt=/^[-+]?0[xX]/,Kt=z(Jt.test),Qt=function(t,n){var e=ct(Y(t));return"᠎"===Vt(e,0)?NaN:Rt(e,Ut(n)||(Kt(Jt,e)?16:10))},Wt=2..constructor,Yt=z("Cannot convert a Symbol value to a number".slice),Zt=/^0b[01]+$/i,tn=Zt.constructor,nn=z(Zt.test),en=/^0o[0-7]+$/i,rn=new tn("[…᠎​￾]","g"),on=/^[-+]0x[0-9a-f]+$/i,un=function(t,n){return Qt(Yt(t,2),n)},cn=function(t,n){return function(t){return nn(Zt,t)}(n)?t(un(n,2)):function(t){return nn(en,t)}(n)?t(un(n,8)):null},sn=function(t,n){var e=cn(t,n);if(null!==e)return e;if(function(t){return nn(rn,t)}(n)||function(t){return nn(on,t)}(n))return NaN;var r=lt(n);return r!==n?t(r):null},fn=function t(n){var e=function(t){if(V()(t))throw new TypeError("Cannot convert a Symbol value to a number");return t}(Ht(n,Wt));if("string"==typeof e){var r=sn(t,e);if(null!==r)return r}return Wt(e)},an=function(t){return t!=t},ln=function(t){return"number"==typeof t&&!1===an(t)&&t!==1/0&&t!==-1/0},pn=function(t){var n=fn(t);return 0===n||an(n)?n:n>0?1:-1},yn=Math.abs,dn=Math.floor,bn=function(t){var n=fn(t);return an(n)?0:0===n||!1===ln(n)?n:pn(n)*dn(yn(n))},gn=function(t){var n=bn(t);return n<=0?0:n>9007199254740991?9007199254740991:n},vn=z("".split),hn=function(t){return t},mn=s?hn:function(t){return u()(t)?vn(t,""):hn(t)},wn=function(t,n){var e=q(t);_t(n);var r=mn(e),o=gn(r.length);if(o)for(var i=arguments[2],u=0;u<o;u+=1)if(D(n,i,[r[u],u,e]))return!0;return!1};e.d(n,"implementation",function(){return Pn});var Sn,jn,On=[].some,Tn="function"==typeof On&&z(On),xn="undefined"!=typeof document&&document,$n=function(){return!1===G(this)}(),En=G(Tn)&&(Sn=0,!1===(jn=A(function(){return Tn([1,2],function(t){return Sn+=t,!1})})).threw&&!1===jn.value&&3===Sn)&&function(){var t="",n=A(function(){return Tn(q("abc"),function(n,e){return t+=n,1===e})});return!1===n.threw&&!0===n.value&&"ab"===t}()&&function(){var t=0,n=A(function(){var n=function(){return arguments}(1,2,3);return Tn(n,function(n,e){return t+=n,2===e})});return!1===n.threw&&!0===n.value&&6===t}()&&function(){var t=0,n=A(function(){return Tn({0:1,1:2,3:3,4:4,length:4},function(n){return t+=n,!1})});return!1===n.threw&&!1===n.value&&6===t}()&&function(){if(xn){var t=null,n=xn.createDocumentFragment(),e=xn.createElement("div");n.appendChild(e);var r=A(function(){return Tn(n.childNodes,function(n){return t=n,n})});return!1===r.threw&&!0===r.value&&t===e}return!0}()&&function(){if($n){var t=null,n=function(){t="string"==typeof this},e=A(function(){return Tn([1],n,"x")});return!1===e.threw&&!1===e.value&&!0===t}return!0}()&&function(){var t={},n=A(function(){return Function("nativeSome","spy","castBoolean",'return nativeSome("foo", function (_, __, context) {if (castBoolean(context) === false || typeof context !== "object") {spy.value = true;}});')(Tn,t,G)});return!1===n.threw&&!1===n.value&&!0!==t.value}();console.log(En);var Pn=function(t,n){var e=q(t);_t(n);var r=function(){var t=arguments[1];return!!(t in arguments[2]&&D(n,this,[arguments[0],t,e]))};return wn(e,r,arguments[2])},Fn=En?function(t,n){return Tn(B(t),_t(n),arguments[2])}:Pn;n.default=Fn}])});
//# sourceMappingURL=array-some-x.min.js.map
{
"name": "array-some-x",
"version": "3.1.0",
"version": "3.1.1",
"description": "Tests whether some element passes the provided function.",

@@ -54,6 +54,8 @@ "homepage": "https://github.com/Xotic750/array-some-x",

"dependencies": {
"array-any-x": "^1.1.0",
"assert-is-function-x": "^3.1.0",
"attempt-x": "^2.1.0",
"array-any-x": "^1.1.1",
"assert-is-function-x": "^3.1.1",
"attempt-x": "^2.1.1",
"require-object-coercible-x": "^2.1.0",
"simple-call-x": "^1.0.2",
"simple-methodize-x": "^1.0.3",
"to-boolean-x": "^2.1.0",

@@ -70,6 +72,6 @@ "to-object-x": "^2.2.0"

"@babel/runtime": "^7.5.5",
"@types/jest": "^24.0.17",
"@types/node": "^12.7.1",
"@types/webpack": "^4.32.1",
"@xotic750/eslint-config-recommended": "^1.1.2",
"@types/jest": "^24.0.18",
"@types/node": "^12.7.2",
"@types/webpack": "^4.39.0",
"@xotic750/eslint-config-recommended": "^1.1.5",
"babel-core": "^7.0.0-0",

@@ -82,3 +84,3 @@ "babel-eslint": "^10.0.2",

"cross-env": "^5.2.0",
"eslint": "^6.1.0",
"eslint": "^6.2.1",
"eslint-friendly-formatter": "^4.0.1",

@@ -94,3 +96,3 @@ "eslint-import-resolver-webpack": "^0.11.1",

"eslint-plugin-jest": "^22.15.1",
"eslint-plugin-jsdoc": "^15.8.0",
"eslint-plugin-jsdoc": "^15.8.3",
"eslint-plugin-json": "^1.4.0",

@@ -104,4 +106,4 @@ "eslint-plugin-lodash": "^6.0.0",

"eslint-plugin-switch-case": "^1.1.2",
"jest": "^24.8.0",
"jest-cli": "^24.8.0",
"jest": "^24.9.0",
"jest-cli": "^24.9.0",
"jest-file": "^1.0.0",

@@ -113,3 +115,3 @@ "lodash": "^4.17.15",

"prettier": "^1.18.2",
"rimraf": "^2.6.3",
"rimraf": "^3.0.0",
"source-map-loader": "^0.2.4",

@@ -119,5 +121,5 @@ "strip-ansi": "^5.2.0",

"typescript": "^3.5.3",
"webpack": "^4.39.1",
"webpack": "^4.39.2",
"webpack-bundle-analyzer": "^3.4.1",
"webpack-cli": "^3.3.6",
"webpack-cli": "^3.3.7",
"webpack-global-object-x": "^1.0.0",

@@ -124,0 +126,0 @@ "webpack-merge": "^4.2.1"

@@ -7,12 +7,16 @@ import attempt from 'attempt-x';

import toBoolean from 'to-boolean-x';
import methodize from 'simple-methodize-x';
import call from 'simple-call-x';
const ns = [].some;
const nativeSome = typeof ns === 'function' && ns;
const nativeSome = typeof ns === 'function' && methodize(ns);
const test1 = function test1() {
let spy = 0;
const res = attempt.call([1, 2], nativeSome, function spyAdd1(item) {
spy += item;
const res = attempt(function attemptee() {
return nativeSome([1, 2], function spyAdd1(item) {
spy += item;
return false;
return false;
});
});

@@ -25,6 +29,8 @@

let spy = '';
const res = attempt.call(toObject('abc'), nativeSome, function spyAdd2(item, index) {
spy += item;
const res = attempt(function attemptee() {
return nativeSome(toObject('abc'), function spyAdd2(item, index) {
spy += item;
return index === 1;
return index === 1;
});
});

@@ -37,14 +43,14 @@

let spy = 0;
const res = attempt.call(
(function getArgs() {
const res = attempt(function attemptee() {
const args = (function getArgs() {
/* eslint-disable-next-line prefer-rest-params */
return arguments;
})(1, 2, 3),
nativeSome,
function spyAdd3(item, index) {
})(1, 2, 3);
return nativeSome(args, function spyAdd3(item, index) {
spy += item;
return index === 2;
},
);
});
});

@@ -56,6 +62,8 @@ return res.threw === false && res.value === true && spy === 6;

let spy = 0;
const res = attempt.call({0: 1, 1: 2, 3: 3, 4: 4, length: 4}, nativeSome, function spyAdd4(item) {
spy += item;
const res = attempt(function attemptee() {
return nativeSome({0: 1, 1: 2, 3: 3, 4: 4, length: 4}, function spyAdd4(item) {
spy += item;
return false;
return false;
});
});

@@ -66,5 +74,5 @@

const doc = typeof document !== 'undefined' && document;
const test5 = function test5() {
const doc = typeof document !== 'undefined' && document;
if (doc) {

@@ -75,6 +83,8 @@ let spy = null;

fragment.appendChild(div);
const res = attempt.call(fragment.childNodes, nativeSome, function spyAssign(item) {
spy = item;
const res = attempt(function attemptee() {
return nativeSome(fragment.childNodes, function spyAssign(item) {
spy = item;
return item;
return item;
});
});

@@ -88,8 +98,8 @@

const isStrict = (function getIsStrict() {
/* eslint-disable-next-line babel/no-invalid-this */
return toBoolean(this) === false;
})();
const test6 = function test6() {
const isStrict = (function getIsStrict() {
/* eslint-disable-next-line babel/no-invalid-this */
return toBoolean(this) === false;
})();
if (isStrict) {

@@ -103,3 +113,5 @@ let spy = null;

const res = attempt.call([1], nativeSome, thisTest, 'x');
const res = attempt(function attemptee() {
return nativeSome([1], thisTest, 'x');
});

@@ -115,8 +127,10 @@ return res.threw === false && res.value === false && spy === true;

const fn =
'return nativeSome.call("foo", function (_, __, context) {' +
'return nativeSome("foo", function (_, __, context) {' +
'if (castBoolean(context) === false || typeof context !== "object") {' +
'spy.value = true;}});';
/* eslint-disable-next-line no-new-func */
const res = attempt(Function('nativeSome', 'spy', 'castBoolean', fn), nativeSome, spy, toBoolean);
const res = attempt(function attemptee() {
/* eslint-disable-next-line no-new-func */
return Function('nativeSome', 'spy', 'castBoolean', fn)(nativeSome, spy, toBoolean);
});

@@ -128,12 +142,7 @@ return res.threw === false && res.value === false && spy.value !== true;

console.log(isWorking);
const patchedSome = function some(array, callBack /* , thisArg */) {
requireObjectCoercible(array);
const args = [assertIsFunction(callBack)];
if (arguments.length > 2) {
/* eslint-disable-next-line prefer-rest-params,prefer-destructuring */
args[1] = arguments[2];
}
return nativeSome.apply(array, args);
/* eslint-disable-next-line prefer-rest-params */
return nativeSome(requireObjectCoercible(array), assertIsFunction(callBack), arguments[2]);
};

@@ -156,3 +165,3 @@

/* eslint-disable-next-line prefer-rest-params,babel/no-invalid-this */
if (callBack.call(this, arguments[0], i, object)) {
if (call(callBack, this, [arguments[0], i, object])) {
return true;

@@ -159,0 +168,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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