Big update!Announcing Socket for GitHub 1.0. Learn more
Socket
BlogLoveFAQ
Install
Log in

is-weakref

Package Overview
Dependencies
1
Maintainers
1
Versions
3
Issues
File Explorer

Advanced tools

is-weakref

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

    1.0.2latest

Version published
Maintainers
1
Weekly downloads
20,465,110
increased by0.89%

Weekly downloads

Changelog

Source

v1.0.2 - 2021-12-10

Commits

Readme

Source

is-weakref Version Badge

github actions coverage dependency status dev dependency status License Downloads

[![npm badge][11]][1]

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

Keywords

FAQs

What is is-weakref?

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

Is is-weakref popular?

The npm package is-weakref receives a total of 19,423,263 weekly downloads. As such, is-weakref popularity was classified as popular.

Is is-weakref well maintained?

We found that is-weakref demonstrated a healthy version release cadence and project activity. It has 1 open source maintainer collaborating on the project.

Last updated on 10 Dec 2021
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc