Launch Week Day 5: Introducing Reachability for PHP.Learn More
Socket
Book a DemoSign in
Socket

deep-weak-map

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deep-weak-map

WeakMap with an array of keys

latest
npmnpm
Version
1.1.0
Version published
Weekly downloads
36
38.46%
Maintainers
1
Weekly downloads
 
Created
Source

deep-weak-map

WeakMap with an array of keys

npm Coverage Status

Example

import DeepWeakMap from 'deep-weak-map';

const [ a, b, c, d ] = [
	randomObject(),
	randomObject(),
	randomObject(),
	randomObject(),
];

const value = randomObject();

const map = new DeepWeakMap();

map.set([ a, b, c ], value);

map.has([ a, b, c ]); // → true
map.has([ a, b, d ]); // → false

map.get([ a, b, c ]); // → value
map.get([ a, b, d ]); // → undefined

map.delete([ a, b, c ]);
map.has([ a, b, c ]); // → false

Install

yarn add deep-weak-map

Keywords

map

FAQs

Package last updated on 26 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts