You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
canteen/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/is-shared-array-buffer
吴治霖 c1d37358dd
主页与其它页面跳转,与基本数据渲染
1 year ago
..
.github 主页与其它页面跳转,与基本数据渲染 1 year ago
test 主页与其它页面跳转,与基本数据渲染 1 year ago
.eslintignore 主页与其它页面跳转,与基本数据渲染 1 year ago
.eslintrc 主页与其它页面跳转,与基本数据渲染 1 year ago
.nycrc 主页与其它页面跳转,与基本数据渲染 1 year ago
CHANGELOG.md 主页与其它页面跳转,与基本数据渲染 1 year ago
LICENSE 主页与其它页面跳转,与基本数据渲染 1 year ago
README.md 主页与其它页面跳转,与基本数据渲染 1 year ago
index.js 主页与其它页面跳转,与基本数据渲染 1 year ago
package.json 主页与其它页面跳转,与基本数据渲染 1 year ago

README.md

is-shared-array-buffer Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Is this value a JS SharedArrayBuffer? This module works cross-realm/iframe, does not depend on instanceof or mutable properties, and despite ES6 Symbol.toStringTag.

Example

var assert = require('assert');
var isSharedArrayBuffer = require('is-shared-array-buffer');

assert(!isSharedArrayBuffer(function () {}));
assert(!isSharedArrayBuffer(null));
assert(!isSharedArrayBuffer(function* () { yield 42; return Infinity; });
assert(!isSharedArrayBuffer(Symbol('foo')));
assert(!isSharedArrayBuffer(1n));
assert(!isSharedArrayBuffer(Object(1n)));

assert(!isSharedArrayBuffer(new Set()));
assert(!isSharedArrayBuffer(new WeakSet()));
assert(!isSharedArrayBuffer(new Map()));
assert(!isSharedArrayBuffer(new WeakMap()));
assert(!isSharedArrayBuffer(new WeakRef({})));
assert(!isSharedArrayBuffer(new FinalizationRegistry(() => {})));
assert(!isSharedArrayBuffer(new ArrayBuffer()));

assert(isSharedArrayBuffer(new SharedArrayBuffer()));

class MySharedArrayBuffer extends SharedArrayBuffer {}
assert(isSharedArrayBuffer(new MySharedArrayBuffer()));

Tests

Simply clone the repo, npm install, and run npm test