Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 26, 2024 via pnpm

is-weakref 1.0.2

Is this value a JS WeakRef? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
Package summary
Share
0
issues
1
license
13
MIT
Package created
2 Aug 2020
Version published
10 Dec 2021
Maintainers
1
Total deps
13
Direct deps
1
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
13 Packages, Including:
call-bind@1.0.7
define-data-property@1.1.4
es-define-property@1.0.0
es-errors@1.3.0
function-bind@1.1.2
get-intrinsic@1.2.4
gopd@1.0.1
has-property-descriptors@1.0.2
has-proto@1.0.3
has-symbols@1.0.3
hasown@2.0.2
is-weakref@1.0.2
set-function-length@1.2.2
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

1
All Dependencies CSV
β“˜ This is a list of is-weakref 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
call-bind1.0.721.6 kBMIT
prod

Visualizations

Frequently Asked Questions

What does is-weakref do?

Is-weakref is an npm package that provides a method for checking if a particular value is a JavaScript WeakRef. It boasts capabilities for cross-realm and cross-iframe compatibility, allowing for wide usage. Moreover, it handles cases despite ES6 @@toStringTag, making it a versatile tool for developers.

How do you use is-weakref?

To use is-weakref in your JavaScript project, you first need to install it via npm using the command npm install is-weakref. After that, you can import it into your JavaScript file using a require statement. For example:

var isWeakRef = require('is-weakref');

Then, you can use the isWeakRef function to check if a particular object is a WeakRef or not. Here are some usage examples:

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({})));

In the provided code snippet, the isWeakRef function is used to confirm whether various entities are WeakRef or not.

Where are the is-weakref docs?

The is-weakref documentation is quite straightforward and contained within the README file on the package's GitHub repository. You can access this by visiting the git repository at git+https://github.com/inspect-js/is-weakref.git. The documentation consists of installation instructions, usage examples, and tips for running tests. It's designed to provide all the necessary information for developers to get started using the package and integrating it into their JavaScript projects.

All Versions