APPLE 323c2f1633 wesmiler 点什么广告 пре 3 година
..
.github 323c2f1633 wesmiler 点什么广告 пре 3 година
test 323c2f1633 wesmiler 点什么广告 пре 3 година
.eslintignore 323c2f1633 wesmiler 点什么广告 пре 3 година
.eslintrc 323c2f1633 wesmiler 点什么广告 пре 3 година
.nycrc 323c2f1633 wesmiler 点什么广告 пре 3 година
CHANGELOG.md 323c2f1633 wesmiler 点什么广告 пре 3 година
LICENSE 323c2f1633 wesmiler 点什么广告 пре 3 година
README.md 323c2f1633 wesmiler 点什么广告 пре 3 година
index.js 323c2f1633 wesmiler 点什么广告 пре 3 година
package.json 323c2f1633 wesmiler 点什么广告 пре 3 година

README.md

is-weakref Version Badge

dependency status dev dependency status License Downloads

npm badge

Is this value a JS WeakRef? This module works cross-realm/iframe, and despite ES6 @@toStringTag.

Example

var isWeakRef = require('is-weakref');
assert(!isWeakRef(function () {}));
assert(!isWeakRef(null));
assert(!isWeakRef(function* () { yield 42; return Infinity; });
assert(!isWeakRef(Symbol('foo')));
assert(!isWeakRef(1n));
assert(!isWeakRef(Object(1n)));

assert(!isWeakRef(new Set()));
assert(!isWeakRef(new WeakSet()));
assert(!isWeakRef(new Map()));
assert(!isWeakRef(new WeakMap()));

assert(isWeakRef(new WeakRef({})));

class MyWeakRef extends WeakRef {}
assert(isWeakRef(new MyWeakRef({})));

Tests

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