es-feature-tests
Advanced tools
Comparing version 0.1.1-a to 0.2.0-a
/*! es-feature-tests | ||
v0.1.1-a (c) Kyle Simpson | ||
v0.2.0-a (c) Kyle Simpson | ||
MIT License: http://getify.mit-license.org | ||
*/ | ||
function runIt(e){return new Function(e)()}var results={},es6,setup;global="undefined"!=typeof global?global:runIt("return this"),setup=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={},i=!0;return Object.keys(e).forEach(function(i){e[i].passes?r[i]=s(e[i].passes):e[i].fails?r[i]=!s(e[i].fails):e[i].is?r[i]=t(e[i].is):e[i].not&&(r[i]=!t(e[i].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]||(i=!1)}),r.everything=i,r}function i(s,t){function i(s){var i=JSON.parse(s.data);i.id;t=t||s.source,"all"==i.req?(e(results,r(es6)),i.res=results,a(JSON.stringify(i))):"api"==i.req&&(i.res=es6,a(JSON.stringify(i)))}function a(e){t.postMessage(e)}s.addEventListener("message",i,!1)}function a(e){var s=e.ports[0];i(s,s),s.start()}function n(e){"start"===e.data&&(self.removeEventListener("message",n),i(self,self))}if(es6={letConst:{passes:"'use strict'; let a; const b = 2;"},letLoop:{passes:"'use strict'; for(let i in {}){}; for(let i=0;;){break}"},constLoop:{passes:"'use strict'; for(const i in {}){}; for (const i=0;;){break}"},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:{passes:"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;"},letLoopScope:{dependencies:["letLoop","forOf"],passes:"'use strict'; var x=[],i=0;for(let i=2;i<3;i++){x.push(function(){return i})};for(let i in {3:0}){x.push(function(){return i})};for(let i of [4]){x.push(function(){return i})};if(x[0]()*x[1]()*x[2]()!=24) throw 0;"},constRedef:{dependencies:["letConst"],fails:"'use strict'; const a = 1; a = 2;"},objectProto:{passes:"'use strict'; var a = { b: 2 }, c = { __proto__: a }; if (c.b !== 2) throw 0;"},objectSuper:{passes:"'use strict'; var a = { b: 2 }, c = { d() { 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 ('getOwnPropertySymbols' 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=i,module.exports.es6=es6,module.exports.results=results;else if("onconnect"in self)self.addEventListener("connect",a);else{if("undefined"!=typeof window)return i;self.addEventListener("message",n)}}(); |
/*! es-feature-tests | ||
v0.1.1-a (c) Kyle Simpson | ||
v0.2.0-a (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=1011,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}); | ||
!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=1200,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.1.1-a (c) Kyle Simpson | ||
v0.2.0-a (c) Kyle Simpson | ||
MIT License: http://getify.mit-license.org | ||
@@ -4,0 +4,0 @@ */ |
/*! es-feature-tests | ||
v0.1.1-a (c) Kyle Simpson | ||
v0.2.0-a (c) Kyle Simpson | ||
MIT License: http://getify.mit-license.org | ||
@@ -154,3 +154,3 @@ */ | ||
origin = "https://featuretests.io", | ||
version = 1011, requests = {}, | ||
version = 1200, requests = {}, | ||
local_storage_available, | ||
@@ -157,0 +157,0 @@ expiration = 14 * 1000 * 60 * 60 * 24; |
{ | ||
"name": "es-feature-tests", | ||
"version": "0.1.1-a", | ||
"version": "0.2.0-a", | ||
"description": "Feature Tests for JavaScript", | ||
@@ -5,0 +5,0 @@ "main": "./lib/rs.js", |
@@ -140,3 +140,3 @@ # ES Feature Tests | ||
```js | ||
var testify = require("es-feature-tests/lib/testify/index.js"), | ||
var testify = require("es-feature-tests/testify"), | ||
code = testify.scan({ ..options.. }); | ||
@@ -143,0 +143,0 @@ |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
57064
13
1014
3