es-feature-tests
Advanced tools
Comparing version 0.0.4-a to 0.0.4-b
/*! es-feature-tests | ||
v0.0.4-a (c) Kyle Simpson | ||
v0.0.4-b (c) Kyle Simpson | ||
MIT License: http://getify.mit-license.org | ||
*/ | ||
function runIt(e){return new Function(e)()}var results={},es6;global="undefined"!=typeof global?global:new Function("return this;")(),function(){"use strict";function e(e,s){Object.keys(s).forEach(function(t){e[t]=s[t]})}function s(e){try{return runIt(e),!0}catch(s){return!1}}function t(e){try{return runIt(e)}catch(s){return!1}}function r(e){var r={},a=!0;return Object.keys(e).forEach(function(a){e[a].passes?r[a]=s(e[a].passes):e[a].fails?r[a]=!s(e[a].fails):e[a].is?r[a]=t(e[a].is):e[a].not&&(r[a]=!t(e[a].not))}),Object.keys(e).forEach(function(s){e[s].dependencies&&(e[s].dependencies.reduce(function(s,t){return s&&e[t]},!0)||(r[s]=!1)),r[s]||(a=!1)}),r.everything=a,r}function a(s,t){function a(s){var a=JSON.parse(s.data);a.id;t=t||s.source,"all"==a.req?(e(results,r(es6)),a.res=results,i(JSON.stringify(a))):"api"==a.req&&(a.res=es6,i(JSON.stringify(a)))}function i(e){t.postMessage(e)}s.addEventListener("message",a,!1)}function i(e){var s=e.ports[0];a(s,s),s.start()}function n(e){"start"===e.data&&(self.removeEventListener("message",n),a(self,self))}es6={letConst:{passes:"'use strict'; let a; const b = 2;"},defaultParameter:{passes:"'use strict'; function a(b=2){}"},spreadRest:{passes:"'use strict'; var a = [1,2]; +function b(...c){}(...a);"},destructuring:{passes:"'use strict'; var a = [1,2], [b,c] = a, d = {e:1,f:2}, {e:E,f} = d;"},parameterDestructuring:{passes:"'use strict'; function a({b,c}){}"},templateString:{passes:"'use strict'; var a = 1, b = `c${a}d`;"},forOf:{passes:"'use strict'; for (var a of [1]) {}"},arrow:{passes:"'use strict'; var a = () => {};"},generator:{passes:"'use strict'; function *a(){ yield; }"},conciseMethodProperty:{passes:"'use strict'; var a = 1, b = { c(){}, a };"},computedProperty:{passes:"'use strict'; var a = 1, b = { ['x'+a]: 2 };"},moduleExport:{passes:"'use strict'; export var a = 1;"},moduleImport:{passes:"'use strict'; import {a} from 'b';"},classes:{passes:"'use strict'; class Foo {}; class Bar extends Foo {};"},numericLiteral:{passes:"'use strict'; var a = 0o1, b = 0b10;"},oldOctalLiteral:{fails:"'use strict'; var a = 01;"},symbol:{passes:"'use strict'; var a = Symbol('b');"},unicodeEscape:{passes:"'use strict'; var a = '\\u{20BB7}';"},unicodeIdentifier:{passes:"'use strict'; var \\u{20BB7};"},unicodeRegExp:{passes:"'use strict'; var a = /\\u{20BB7}/u;"},stickyRegExp:{passes:"'use strict'; var a = /b/y;"}},e(es6,{"class":es6.classes,letTDZ:{dependencies:["letConst"],fails:"'use strict'; a = 1; let a;"},constRedef:{dependencies:["letConst"],fails:"'use strict'; const a = 1; a = 2;"},objectProto:{passes:"'use strict'; var a = { b: 2 }, c = { __proto__: a }; if (!Object.if (c.b !== 2) throw 0;"},objectSuper:{passes:"'use strict'; var a = { b: 2 }, c = { d: function() { return super.b; } }; Object.setPrototypeOf(c,a); if (c.d() !== 2) throw 0;"},extendNatives:{dependencies:["class"],passes:"'use strict'; class Foo extends Array { }; var a = new Foo(); a.push(1,2,3); if (a.length !== 3) throw 0;"},TCO:{passes:"'use strict'; +function a(b){ if (b<6E4) a(b+1); }(0);"},symbolImplicitCoercion:{fails:"'use strict'; var a = Symbol('a'); a + '';"},functionNameInference:{passes:"'use strict'; var a = { b: function(){} }; if (a.name != 'b') throw 0;"},ObjectStatics:{is:"'use strict'; return ('getOwnSymbolNames' in Object) && ('assign' in Object) && ('is' in Object);"},ArrayStatics:{is:"'use strict'; return ('from' in Array) && ('of' in Array);"},ArrayMethods:{is:"'use strict'; return ('fill' in Array.prototype) && ('find' in Array.prototype) && ('findIndex' in Array.prototype) && ('entries' in Array.prototype) && ('keys' in Array.prototype) && ('values' in Array.prototype);"},TypedArrays:{is:"'use strict'; return ('ArrayBuffer' in global) && ('Int8Array' in global) && ('Uint8Array' in global) && ('Int32Array' in global) && ('Float64Array' in global);"},TypedArrayStatics:{dependencies:["TypedArrays"],is:"use strict'; return ('from' in Uint32Array) && ('of' in Uint32Array);"},TypedArrayMethods:{dependencies:["TypedArrays"],is:"'use strict'; var x = new Int8Array(1); return ('slice' in x) && ('join' in x) && ('map' in x) && ('forEach' in x);"},StringMethods:{is:"'use strict'; return ('includes' in String.prototype) && ('repeat' in String.prototype);"},NumberStatics:{is:"'use strict'; return ('isNaN' in Number) && ('isInteger' in Number);"},MathStatics:{is:"'use strict'; return ('hypot' in Math) && ('acosh' in Math) && ('imul' in Math);"},collections:{is:"'use strict'; return ('Map' in global) && ('Set' in global) && ('WeakMap' in global) && ('WeakSet' in global);"},Proxy:{is:"'use strict'; return ('Proxy' in global);"},Promise:{is:"'use strict'; return ('Promise' in global);"}}),"undefined"!=typeof module&&module.exports?(module.exports.setup=a,module.exports.es6=es6,module.exports.results=results):"onconnect"in self?self.addEventListener("connect",i):"undefined"==typeof window&&self.addEventListener("message",n)}(); |
/*! es-feature-tests | ||
v0.0.4-a (c) Kyle Simpson | ||
v0.0.4-b (c) Kyle Simpson | ||
MIT License: http://getify.mit-license.org | ||
*/ | ||
!function(e,t,n){t[e]=t[e]||n(e,t),"undefined"!=typeof module&&module.exports?module.exports=t[e]:"function"==typeof define&&define.amd&&define(function(){return t[e]})}("Reflect.supports",new Function("return this;")(),function(e,t){"use strict";function n(e){for(u=e;m.length>0;)u(m.shift())}function i(e){var t,n=Date.now();if(e.origin===g){if(t=JSON.parse(e.data),f&&"all"==t.req)try{localStorage.setItem(g,JSON.stringify({expires:t.expires||n+y,version:h,results:t.res}))}catch(i){}v[t.id]&&("api"==t.req?v[t.id](t.res):v[t.id](t.res,t.expires-y||n),v[t.id]=null)}}function o(e,t){var n;do n="x"+Math.random();while(v[n]);v[n]=t,e=JSON.stringify({id:n,req:e}),u?u(e):m.push(e)}function s(){p&&localStorage.removeItem(g)}function r(e,t){var n,i=Date.now();if(e="all",t=t||function(){},!r.disabled){if("all"==e&&f&&(n=localStorage.getItem(g)))try{if(n=JSON.parse(n),n.expires=n.expires||i+y,i<n.expires&&n.version&&n.version==h)return void setTimeout(function(){t(n.results,n.expires-y)},0);s()}catch(u){}a(),o(e,t)}}function a(){!l&&"postMessage"in t&&"document"in t&&(l=t.document.createElement("iframe"),l.style.display="none",l.src=g+"/featuretests.html?cache="+(f?"yes":"no")+"&v="+h,t.document.body.appendChild(l),c=t,d=l.contentWindow&&l.contentWindow.postMessage?l.contentWindow:l,c.addEventListener("message",i,!1),l.addEventListener("load",function(){n(function(e){d.postMessage(e,g)})},!1))}r.disableLocalCache=function(){f=!1,s()},r.clearLocalSiteCache=s,r.api=function(e,t){e="api",t=t||function(){},r.disabled||(a(),o(e,t))};var u,c,d,f,l,p,m=[],g="https://featuretests.io",h=1004,v={},y=12096e5;return Date.now||(Date.now=function(){return Number(new Date)}),f=p=function(e){try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(t){return!1}}("storage:featuretests.io"),"undefined"!=typeof module&&module.exports?(c={addEventListener:function(e,t){n(function(e){setTimeout(function(){t({data:e})},0)})}},d={postMessage:function(e){setTimeout(function(){i({origin:g,data:e})},0)}},require("./featuretests.js").setup(c,d)):"postMessage"in t&&"document"in t||(r.disabled=!0),r}); |
/*! es-feature-tests | ||
v0.0.4-a (c) Kyle Simpson | ||
v0.0.4-b (c) Kyle Simpson | ||
MIT License: http://getify.mit-license.org | ||
@@ -4,0 +4,0 @@ */ |
/*! es-feature-tests | ||
v0.0.4-a (c) Kyle Simpson | ||
v0.0.4-b (c) Kyle Simpson | ||
MIT License: http://getify.mit-license.org | ||
@@ -4,0 +4,0 @@ */ |
{ | ||
"name": "es-feature-tests", | ||
"version": "0.0.4-a", | ||
"version": "0.0.4-b", | ||
"description": "es-feature-tests: Feature Tests for JavaScript", | ||
@@ -5,0 +5,0 @@ "main": "./lib/rs.js", |
Sorry, the diff of this file is not supported yet
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
34790