es6-collections
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -5,3 +5,3 @@ /*! | ||
/**@license (C) @WebReflection - Mit Style License | ||
*/"WeakMap" in this || (function (module) {"use strict"; | ||
*/(function (module) {"use strict"; | ||
@@ -8,0 +8,0 @@ //!(C) WebReflection - Mit Style License |
/*! | ||
(C) @WebReflection - Mit Style License | ||
*/ | ||
"WeakMap" in this||(function(d){function v(){var D=[],i=[];return q(t,{"delete":{value:C.call(m,A,l,D,i)},get:{value:C.call(y,A,l,D,i)},has:{value:C.call(c,A,l,D,i)},set:{value:C.call(r,A,l,D,i)}})}function f(){var D=[],i=[];return q(e,{"delete":{value:C.call(m,A,u,D,i)},get:{value:C.call(y,A,u,D,i)},has:{value:C.call(c,A,u,D,i)},set:{value:C.call(r,A,u,D,i)}})}function x(){var E=[],i=[],D=C.call(c,A,u,i,E);return q(B,{"delete":{value:C.call(m,A,u,i,E)},has:{value:D},add:{value:C.call(k,A,u,D,i)}})}function m(F,E,i,D){if(c(F,E,i,D)){E.splice(w,1);i.splice(w,1)}return -1<w}function y(F,E,i,D){return c(F,E,i,D)?i[w]:h}function c(F,E,i,D){if(F&&D!==z(D)){throw new TypeError("not a non-null object")}w=a.call(E,D);return -1<w}function r(G,E,i,D,F){c(G,E,i,D)?i[w]=F:i[E.push(D)-1]=F}function k(F,D,i,E){(!D(E)&&!!i.push(E))}function a(i){if(i!=i||i===0){for(w=this.length;w--&&!j(this[w],i);){}}else{w=b.call(this,i)}return w}function p(){}var A=null,l=true,u=false,o=d=="undefined",n=o?this:global,d=o?{}:exports,z=n.Object,t=v.prototype,e=f.prototype,B=x.prototype,g=z.defineProperty,s=[].slice,j=z.is||function(D,i){return D===i?D!==0||1/D==1/i:D!=D&&i!=i},C=v.bind||function C(D,H,F,i){var G=this;return function E(I,J){return G.call(D,H,F,i,I,J)}},q=z.create||function q(E,F){p.prototype=E;var i=new p,D;for(D in F){i[D]=F[D].value}return i},b=[].indexOf||function b(i){for(w=this.length;w--&&this[w]!==i;){}return w},h,w;v.prototype=t=v();f.prototype=e=f();x.prototype=B=x();n.WeakMap=d.WeakMap=n.WeakMap||v;n.Map=d.Map=n.Map||f;n.Set=d.Set=n.Set||x}.call(this,typeof exports)); | ||
(function(d){function v(){var D=[],i=[];return q(t,{"delete":{value:C.call(m,A,l,D,i)},get:{value:C.call(y,A,l,D,i)},has:{value:C.call(c,A,l,D,i)},set:{value:C.call(r,A,l,D,i)}})}function f(){var D=[],i=[];return q(e,{"delete":{value:C.call(m,A,u,D,i)},get:{value:C.call(y,A,u,D,i)},has:{value:C.call(c,A,u,D,i)},set:{value:C.call(r,A,u,D,i)}})}function x(){var E=[],i=[],D=C.call(c,A,u,i,E);return q(B,{"delete":{value:C.call(m,A,u,i,E)},has:{value:D},add:{value:C.call(k,A,u,D,i)}})}function m(F,E,i,D){if(c(F,E,i,D)){E.splice(w,1);i.splice(w,1)}return -1<w}function y(F,E,i,D){return c(F,E,i,D)?i[w]:h}function c(F,E,i,D){if(F&&D!==z(D)){throw new TypeError("not a non-null object")}w=a.call(E,D);return -1<w}function r(G,E,i,D,F){c(G,E,i,D)?i[w]=F:i[E.push(D)-1]=F}function k(F,D,i,E){(!D(E)&&!!i.push(E))}function a(i){if(i!=i||i===0){for(w=this.length;w--&&!j(this[w],i);){}}else{w=b.call(this,i)}return w}function p(){}var A=null,l=true,u=false,o=d=="undefined",n=o?this:global,d=o?{}:exports,z=n.Object,t=v.prototype,e=f.prototype,B=x.prototype,g=z.defineProperty,s=[].slice,j=z.is||function(D,i){return D===i?D!==0||1/D==1/i:D!=D&&i!=i},C=v.bind||function C(D,H,F,i){var G=this;return function E(I,J){return G.call(D,H,F,i,I,J)}},q=z.create||function q(E,F){p.prototype=E;var i=new p,D;for(D in F){i[D]=F[D].value}return i},b=[].indexOf||function b(i){for(w=this.length;w--&&this[w]!==i;){}return w},h,w;v.prototype=t=v();f.prototype=e=f();x.prototype=B=x();n.WeakMap=d.WeakMap=n.WeakMap||v;n.Map=d.Map=n.Map||f;n.Set=d.Set=n.Set||x}.call(this,typeof exports)); |
{ | ||
"name": "es6-collections", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "ES6 Harmony like collections such Map, WeakMap, and Set", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/WebReflection/es6-collections", |
@@ -0,1 +1,2 @@ | ||
[![build status](https://secure.travis-ci.org/WebReflection/es6-collections.png)](http://travis-ci.org/WebReflection/es6-collections) | ||
ES6 Harmony Collections Fast Polyfill | ||
@@ -2,0 +3,0 @@ =========================================== |
@@ -1,2 +0,2 @@ | ||
"WeakMap" in this || (function (module) {"use strict"; | ||
(function (module) {"use strict"; | ||
@@ -3,0 +3,0 @@ //!(C) WebReflection - Mit Style License |
@@ -19,3 +19,3 @@ if (typeof require != "undefined") { | ||
*/ | ||
var setTimeout=global.setTimeout,setInterval=global.setInterval,clearInterval=global.clearInterval,clearTimeout=global.clearTimeout;setTimeout||(function(h,c,g,a){setInterval=global.setInterval=function b(j,i){return e(j,i,g.call(arguments,2),1)};setTimeout=global.setTimeout=function d(j,i){return e(j,i,g.call(arguments,2))};clearInterval=global.clearInterval=clearTimeout=global.clearTimeout=function f(i){c[i].cancel();h.purge();delete c[i]};function e(l,k,j,i){var m=++a;c[m]=new JavaAdapter(java.util.TimerTask,{run:function(){l.apply(null,j)}});i?h.schedule(c[m],k,k):h.schedule(c[m],k);return m}})(new java.util.Timer(),{},[].slice,0);var $wru=function(U){function h(){w=F.call(j);if(w){l(Z);l((ad(w,O)&&w[O])||(ad(w,e)&&w[e])||L);a=[];q=[];P=[];X={};b("setup");P[ae]||b("test");I||n()}else{p()}}function l(ah,ag){ah=ah+(ag?"":"\n");try{require("util").print(ah)}catch(af){try{require("sys").print(ah)}catch(af){try{java.lang.System.out.print(ah)}catch(af){console.log(ah)}}}}function p(){l(g);l(Z);switch(true){case !!aa:l(N+" "+aa+" Errors");case !!z:l(J+g+z+" Failures");default:l(y+" "+o+" Passes")}l(Z);l(g);try{process.exit()}catch(af){quit()}}function c(af){for(var ag=0,ah=af[ae];ag<ah;l(" "+(++ag)+". "+af[ag-1])){}}function n(){f();o+=a[ae];z+=q[ae];aa+=P[ae];if(P[ae]){S=N;c(P)}else{if(q[ae]){S=J;c(q)}else{S=y}}l(S+" passes: "+a[ae]+", fails: "+q[ae]+", errors: "+P[ae]);H=0;S=g;h()}function b(af){if(ad(w,af)){try{w[af](X)}catch(ag){W.call(P,g+ag)}}}function ad(ag,af){return m.call(ag,af)}function s(){return B()<0.5?-1:1}function f(){if(M){C(M);M=0}b("teardown")}var V={assert:function Q(ag,af){if(arguments[ae]==1){af=ag;ag=L}v=D;W.call(af?a:q,S+ag);return af},async:function R(ag,aj,ah,ai){ai=++I;if(typeof ag=="function"){ah=aj;aj=ag;ag="asynchronous test #"+ai}ah=T(function(){ai=0;W.call(q,ag);--I||(M=T(n,0))},G(ah||u)||u);return function af(){if(!ai){return}v=ab;S=ag+": ";try{aj.apply(this,arguments)}catch(ak){v=D;W.call(P,S+ak)}S=g;if(v){C(ah);--I||(M=T(n,0))}}},test:function k(af){j=E.apply(j,[af]);V.random&&ac.call(j,s);I||h()}},D=true,ab=!D,u=100,g=" ",L="unknown",ae="length",O="name",e="description",A="<li>",d="</li>",i="\\|/-",m=V.hasOwnProperty,S=g,Y=S.charAt,t=S.slice,j=[],E=j.concat,r=j.join,W=j.push,F=j.shift,ac=j.sort,I=0,H=0,o=0,z=0,aa=0,M=0,N="\033[1;31mERROR\033[0m",J="\033[0;31mFAILURE\033[0m",y="\033[0;32mOK\033[0m",Z="------------------------------",x,G,B,T,C,w,K,a,q,P,X,v;if(typeof global!="function"){U.wru=V;U=global}x=U.Math;G=x.abs;B=x.random;T=U.setTimeout;C=U.clearTimeout;U.setInterval(function(){I&&l(g+Y.call(i,H++%4)+"\b\b",true)},u);u*=u;V.random=ab;return V}(this); | ||
var setTimeout=global.setTimeout,setInterval=global.setInterval,clearInterval=global.clearInterval,clearTimeout=global.clearTimeout;setTimeout||(function(h,c,g,a){setInterval=global.setInterval=function b(j,i){return e(j,i,g.call(arguments,2),1)};setTimeout=global.setTimeout=function d(j,i){return e(j,i,g.call(arguments,2))};clearInterval=global.clearInterval=clearTimeout=global.clearTimeout=function f(i){c[i].cancel();h.purge();delete c[i]};function e(l,k,j,i){var m=++a;c[m]=new JavaAdapter(java.util.TimerTask,{run:function(){l.apply(null,j)}});i?h.schedule(c[m],k,k):h.schedule(c[m],k);return m}})(new java.util.Timer(),{},[].slice,0);var $wru=function(U){function h(){w=F.call(j);if(w){l(Z);l((ad(w,O)&&w[O])||(ad(w,e)&&w[e])||L);a=[];q=[];P=[];X={};b("setup");P[ae]||b("test");I||n()}else{p()}}function l(ah,ag){ah=ah+(ag?"":"\n");try{require("util").print(ah)}catch(af){try{require('util').print(ah)}catch(af){try{java.lang.System.out.print(ah)}catch(af){console.log(ah)}}}}function p(){l(g);l(Z);switch(true){case !!aa:l(N+" "+aa+" Errors");case !!z:l(J+g+z+" Failures");default:l(y+" "+o+" Passes")}l(Z);l(g);try{process.exit()}catch(af){quit()}}function c(af){for(var ag=0,ah=af[ae];ag<ah;l(" "+(++ag)+". "+af[ag-1])){}}function n(){f();o+=a[ae];z+=q[ae];aa+=P[ae];if(P[ae]){S=N;c(P)}else{if(q[ae]){S=J;c(q)}else{S=y}}l(S+" passes: "+a[ae]+", fails: "+q[ae]+", errors: "+P[ae]);H=0;S=g;h()}function b(af){if(ad(w,af)){try{w[af](X)}catch(ag){W.call(P,g+ag)}}}function ad(ag,af){return m.call(ag,af)}function s(){return B()<0.5?-1:1}function f(){if(M){C(M);M=0}b("teardown")}var V={assert:function Q(ag,af){if(arguments[ae]==1){af=ag;ag=L}v=D;W.call(af?a:q,S+ag);return af},async:function R(ag,aj,ah,ai){ai=++I;if(typeof ag=="function"){ah=aj;aj=ag;ag="asynchronous test #"+ai}ah=T(function(){ai=0;W.call(q,ag);--I||(M=T(n,0))},G(ah||u)||u);return function af(){if(!ai){return}v=ab;S=ag+": ";try{aj.apply(this,arguments)}catch(ak){v=D;W.call(P,S+ak)}S=g;if(v){C(ah);--I||(M=T(n,0))}}},test:function k(af){j=E.apply(j,[af]);V.random&&ac.call(j,s);I||h()}},D=true,ab=!D,u=100,g=" ",L="unknown",ae="length",O="name",e="description",A="<li>",d="</li>",i="\\|/-",m=V.hasOwnProperty,S=g,Y=S.charAt,t=S.slice,j=[],E=j.concat,r=j.join,W=j.push,F=j.shift,ac=j.sort,I=0,H=0,o=0,z=0,aa=0,M=0,N="\033[1;31mERROR\033[0m",J="\033[0;31mFAILURE\033[0m",y="\033[0;32mOK\033[0m",Z="------------------------------",x,G,B,T,C,w,K,a,q,P,X,v;if(typeof global!="function"){U.wru=V;U=global}x=U.Math;G=x.abs;B=x.random;T=U.setTimeout;C=U.clearTimeout;U.setInterval(function(){I&&l(g+Y.call(i,H++%4)+"\b\b",true)},u);u*=u;V.random=ab;return V}(this); | ||
wru($wru); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
2026288
15
84
1