is-weakmap

WebJar for is-weakmap

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

is-weakmap
Last Version

Last Version

2.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

is-weakmap
WebJar for is-weakmap
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/inspect-js/is-weakmap

Download is-weakmap

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/is-weakmap/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>is-weakmap</artifactId>
    <version>2.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/is-weakmap/
implementation 'org.webjars.npm:is-weakmap:2.0.1'
// https://jarcasting.com/artifacts/org.webjars.npm/is-weakmap/
implementation ("org.webjars.npm:is-weakmap:2.0.1")
'org.webjars.npm:is-weakmap:jar:2.0.1'
<dependency org="org.webjars.npm" name="is-weakmap" rev="2.0.1">
  <artifact name="is-weakmap" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='is-weakmap', version='2.0.1')
)
libraryDependencies += "org.webjars.npm" % "is-weakmap" % "2.0.1"
[org.webjars.npm/is-weakmap "2.0.1"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

is-weakmap Version Badge

dependency status dev dependency status License Downloads

npm badge

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

Example

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

assert(!isWeakMap(new Set()));
assert(!isWeakMap(new WeakSet()));
assert(!isWeakMap(new Map()));

assert(isWeakMap(new WeakMap()));

class MyWeakMap extends WeakMap {}
assert(isWeakMap(new MyWeakMap()));

Tests

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

org.webjars.npm

Inspect JS

JavaScript value inspection tools.

Versions

Version
2.0.1