Socket
Socket
Sign inDemoInstall

es-feature-tests

Package Overview
Dependencies
1
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.2-c to 0.0.3-a

2

deploy/featuretests.js
/*! es-feature-tests
v0.0.2-c (c) Kyle Simpson
v0.0.3-a (c) Kyle Simpson
MIT License: http://getify.mit-license.org
*/
function runIt(s){return new Function(s)()}var results={},es6;global="undefined"!=typeof global?global:new Function("return this;")(),function(){"use strict";function s(s,e){Object.keys(e).forEach(function(t){s[t]=e[t]})}function e(s){try{return runIt(s),!0}catch(e){return!1}}function t(s){try{return runIt(s)}catch(e){return!1}}function r(s){var r={},a=!0;return Object.keys(s).forEach(function(a){s[a].passes?r[a]=e(s[a].passes):s[a].fails?r[a]=!e(s[a].fails):s[a].is?r[a]=t(s[a].is):s[a].not&&(r[a]=!t(s[a].not))}),Object.keys(s).forEach(function(e){s[e].dependencies&&(s[e].dependencies.reduce(function(e,t){return e&&s[t]},!0)||(r[e]=!1)),r[e]||(a=!1)}),r.everything=a,r}function a(e,t){function a(e){var a=JSON.parse(e.data);a.id;t=t||e.source,"all"==a.req?(s(results,r(es6)),a.res=results,i(JSON.stringify(a))):"api"==a.req&&(a.res=es6,i(JSON.stringify(a)))}function i(s){t.postMessage(s)}e.addEventListener("message",a,!1)}function i(s){var e=s.ports[0];a(e,e),e.start()}function n(s){"start"===s.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';"},"class":{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;"}},s(es6,{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);"},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.2-c (c) Kyle Simpson
v0.0.3-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+v,results:t.res}))}catch(i){}y[t.id]&&("api"==t.req?y[t.id](t.res):y[t.id](t.res,t.expires-v||n),y[t.id]=null)}}function o(e,t){var n;do n="x"+Math.random();while(y[n]);y[n]=t,e=JSON.stringify({id:n,req:e}),u?u(e):m.push(e)}function s(){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+v,i<n.expires)return void setTimeout(function(){t(n.results,n.expires-v)},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,p&&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=1002,y={},v=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+v,results:t.res}))}catch(i){}y[t.id]&&("api"==t.req?y[t.id](t.res):y[t.id](t.res,t.expires-v||n),y[t.id]=null)}}function o(e,t){var n;do n="x"+Math.random();while(y[n]);y[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+v,i<n.expires)return void setTimeout(function(){t(n.results,n.expires-v)},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=1003,y={},v=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.2-c (c) Kyle Simpson
v0.0.3-a (c) Kyle Simpson
MIT License: http://getify.mit-license.org

@@ -4,0 +4,0 @@ */

/*! es-feature-tests
v0.0.2-c (c) Kyle Simpson
v0.0.3-a (c) Kyle Simpson
MIT License: http://getify.mit-license.org

@@ -72,3 +72,5 @@ */

function expireLocalCache() {
localStorage.removeItem(origin);
if (local_storage_available) {
localStorage.removeItem(origin);
}
}

@@ -112,7 +114,7 @@

use_local_cache = false;
if (local_storage_available) {
expireLocalCache();
}
expireLocalCache();
};
supports.clearLocalSiteCache = expireLocalCache;
supports.api = function api(req,cb) {

@@ -153,3 +155,3 @@ req = "api";

origin = "https://featuretests.io",
version = 1002, requests = {},
version = 1003, requests = {},
local_storage_available,

@@ -156,0 +158,0 @@ expiration = 14 * 1000 * 60 * 60 * 24;

{
"name": "es-feature-tests",
"version": "0.0.2-c",
"version": "0.0.3-a",
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc