mild-map

A WeakMap that supports any value, it holds strong references to primitives, and weak references to objects.

MIT 5 个版本
安装
npm install mild-map
yarn add mild-map
pnpm add mild-map
bun add mild-map
README

MildMap

A WeakMap that supports any value, it holds strong references to primitives, and weak references to objects.

Install

npm install mild-map

Usage

It has the same API of a WeakMap, except that it just works with primitives too.

It also implements the size property, like a Map.

It also implements all the iteration methods, like a Map.

License

MIT © Fabio Spampinato

版本列表
1.2.0 2026-01-02
1.1.2 2025-01-17
1.1.1 2023-02-16
1.1.0 2023-02-14
1.0.0 2023-02-14