wasm-feature-detect
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -1,1 +0,1 @@ | ||
"use strict";async function e(e){return WebAssembly.validate(new Uint8Array(e))}async function n(){try{return await new Promise(e=>{const{port1:n,port2:t}=new MessageChannel;t.onmessage=e,n.postMessage(new SharedArrayBuffer(1))}),!0}catch(e){return!1}}Object.defineProperty(exports,"__esModule",{value:!0});const t=e.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,12,1,0,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11]),r=e.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,6,64,7,26,11,11]),s=e.bind(null,[0,97,115,109,1,0,0,0,1,6,1,96,0,2,127,127,3,2,1,0,10,8,1,6,0,65,0,65,0,11]),l=e.bind(null,[0,97,115,109,1,0,0,0,2,8,1,1,97,1,98,3,127,1,6,6,1,127,1,65,0,11,7,5,1,1,97,3,1]),o=e.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,6,1,4,0,208,26,11]),a=e.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,12,1,10,0,67,0,0,0,0,252,0,26,11]),i=e.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,65,0,192,26,11]),u=e.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,4,26,11]),p=e.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,6,1,4,0,18,0,11]);async function d(){return(await Promise.all([e([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]),n()])).every(e=>e)}exports.bulkMemory=t,exports.exceptions=r,exports.multiValue=s,exports.mutableGlobals=l,exports.referenceTypes=o,exports.saturatedFloatToInt=a,exports.signExtensions=i,exports.simd=u,exports.tailCall=p,exports.threads=d; | ||
"use strict";async function e(e){return WebAssembly.validate(new Uint8Array(e))}async function n(){try{return(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),!0}catch{return!1}}Object.defineProperty(exports,"__esModule",{value:!0});const t=e.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,12,1,0,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11]),r=e.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,6,64,7,26,11,11]),l=e.bind(null,[0,97,115,109,1,0,0,0,1,6,1,96,0,2,127,127,3,2,1,0,10,8,1,6,0,65,0,65,0,11]),s=e.bind(null,[0,97,115,109,1,0,0,0,2,8,1,1,97,1,98,3,127,1,6,6,1,127,1,65,0,11,7,5,1,1,97,3,1]),o=e.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,6,1,4,0,208,26,11]),a=e.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,12,1,10,0,67,0,0,0,0,252,0,26,11]),u=e.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,65,0,192,26,11]),i=e.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,4,26,11]),d=e.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,6,1,4,0,18,0,11]);async function p(){return(await Promise.all([e([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]),n()])).every(e=>e)}exports.bulkMemory=t,exports.exceptions=r,exports.multiValue=l,exports.mutableGlobals=s,exports.referenceTypes=o,exports.saturatedFloatToInt=a,exports.signExtensions=u,exports.simd=i,exports.tailCall=d,exports.threads=p; |
@@ -1,1 +0,1 @@ | ||
async function n(n){return WebAssembly.validate(new Uint8Array(n))}async function e(){try{return await new Promise(n=>{const{port1:e,port2:l}=new MessageChannel;l.onmessage=n,e.postMessage(new SharedArrayBuffer(1))}),!0}catch(n){return!1}}const l=n.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,12,1,0,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11]),r=n.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,6,64,7,26,11,11]),t=n.bind(null,[0,97,115,109,1,0,0,0,1,6,1,96,0,2,127,127,3,2,1,0,10,8,1,6,0,65,0,65,0,11]),a=n.bind(null,[0,97,115,109,1,0,0,0,2,8,1,1,97,1,98,3,127,1,6,6,1,127,1,65,0,11,7,5,1,1,97,3,1]),i=n.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,6,1,4,0,208,26,11]),u=n.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,12,1,10,0,67,0,0,0,0,252,0,26,11]),s=n.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,65,0,192,26,11]),o=n.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,4,26,11]),b=n.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,6,1,4,0,18,0,11]);async function d(){return(await Promise.all([n([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]),e()])).every(n=>n)}export{l as bulkMemory,r as exceptions,t as multiValue,a as mutableGlobals,i as referenceTypes,u as saturatedFloatToInt,s as signExtensions,o as simd,b as tailCall,d as threads}; | ||
async function n(n){return WebAssembly.validate(new Uint8Array(n))}async function l(){try{return(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),!0}catch{return!1}}const e=n.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,12,1,0,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11]),r=n.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,6,64,7,26,11,11]),u=n.bind(null,[0,97,115,109,1,0,0,0,1,6,1,96,0,2,127,127,3,2,1,0,10,8,1,6,0,65,0,65,0,11]),i=n.bind(null,[0,97,115,109,1,0,0,0,2,8,1,1,97,1,98,3,127,1,6,6,1,127,1,65,0,11,7,5,1,1,97,3,1]),t=n.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,6,1,4,0,208,26,11]),a=n.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,12,1,10,0,67,0,0,0,0,252,0,26,11]),s=n.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,65,0,192,26,11]),b=n.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,4,26,11]),d=n.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,6,1,4,0,18,0,11]);async function c(){return(await Promise.all([n([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]),l()])).every(n=>n)}export{e as bulkMemory,r as exceptions,u as multiValue,i as mutableGlobals,t as referenceTypes,a as saturatedFloatToInt,s as signExtensions,b as simd,d as tailCall,c as threads}; |
@@ -1,1 +0,1 @@ | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e=e||self).wasmFeatureDetect={})}(this,function(e){"use strict";async function n(e){return WebAssembly.validate(new Uint8Array(e))}async function t(){try{return await new Promise(e=>{const{port1:n,port2:t}=new MessageChannel;t.onmessage=e,n.postMessage(new SharedArrayBuffer(1))}),!0}catch(e){return!1}}const l=n.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,12,1,0,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11]),i=n.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,6,64,7,26,11,11]),s=n.bind(null,[0,97,115,109,1,0,0,0,1,6,1,96,0,2,127,127,3,2,1,0,10,8,1,6,0,65,0,65,0,11]),r=n.bind(null,[0,97,115,109,1,0,0,0,2,8,1,1,97,1,98,3,127,1,6,6,1,127,1,65,0,11,7,5,1,1,97,3,1]),a=n.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,6,1,4,0,208,26,11]),u=n.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,12,1,10,0,67,0,0,0,0,252,0,26,11]),o=n.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,65,0,192,26,11]),d=n.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,4,26,11]),c=n.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,6,1,4,0,18,0,11]);e.bulkMemory=l,e.exceptions=i,e.multiValue=s,e.mutableGlobals=r,e.referenceTypes=a,e.saturatedFloatToInt=u,e.signExtensions=o,e.simd=d,e.tailCall=c,e.threads=async function(){return(await Promise.all([n([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]),t()])).every(e=>e)},Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e=e||self).wasmFeatureDetect={})}(this,function(e){"use strict";async function n(e){return WebAssembly.validate(new Uint8Array(e))}async function t(){try{return(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),!0}catch{return!1}}const l=n.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,12,1,0,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11]),i=n.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,6,64,7,26,11,11]),u=n.bind(null,[0,97,115,109,1,0,0,0,1,6,1,96,0,2,127,127,3,2,1,0,10,8,1,6,0,65,0,65,0,11]),r=n.bind(null,[0,97,115,109,1,0,0,0,2,8,1,1,97,1,98,3,127,1,6,6,1,127,1,65,0,11,7,5,1,1,97,3,1]),s=n.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,6,1,4,0,208,26,11]),a=n.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,12,1,10,0,67,0,0,0,0,252,0,26,11]),o=n.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,65,0,192,26,11]),d=n.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,4,26,11]),c=n.bind(null,[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,6,1,4,0,18,0,11]);e.bulkMemory=l,e.exceptions=i,e.multiValue=u,e.mutableGlobals=r,e.referenceTypes=s,e.saturatedFloatToInt=a,e.signExtensions=o,e.simd=d,e.tailCall=c,e.threads=async function(){return(await Promise.all([n([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]),t()])).every(e=>e)},Object.defineProperty(e,"__esModule",{value:!0})}); |
{ | ||
"name": "wasm-feature-detect", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "A small library to detect which features of WebAssembly are supported in your current browser.", | ||
@@ -11,3 +11,3 @@ "main": "dist/cjs/index.js", | ||
"build": "npm run build:library && npm run build:readme && npm run fmt", | ||
"fmt": "prettier --write './{,{src,rollup-plugins}/**/}*.{mjs,js,md}'" | ||
"fmt": "prettier --write ./{,{src,rollup-plugins}/**/}*.{mjs,js,md}" | ||
}, | ||
@@ -14,0 +14,0 @@ "repository": "GoogleChromeLabs/wasm-feature-detect", |
@@ -9,3 +9,3 @@ # WebAssembly Feature Detection | ||
- ✅ CSP compatible | ||
- ✅ Only ~550B | ||
- ✅ Only ~520B gzipped | ||
@@ -12,0 +12,0 @@ ## Installation |
@@ -18,11 +18,7 @@ /** | ||
// https://groups.google.com/forum/#!msg/mozilla.dev.platform/IHkBZlHETpA/dwsMNchWEQAJ | ||
await new Promise(resolve => { | ||
const { port1, port2 } = new MessageChannel(); | ||
port2.onmessage = resolve; | ||
port1.postMessage(new SharedArrayBuffer(1)); | ||
}); | ||
new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)); | ||
return true; | ||
} catch (e) { | ||
} catch { | ||
return false; | ||
} | ||
} |
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
264
36495