Skip to main content
Manusで任意のスキルを実行
ワンクリックで

weak-storage

スター0
フォーク0
更新日2026年5月13日 19:20

A Map-like collection with weakly-referenced values built on WeakRef and FinalizationRegistry. Two classes: WeakValueMap<K, V> for key→value lookup with any key type, and WeakStorage<K, V> which adds a WeakMap-backed reverse index for O(1) value→key lookup. Use when building caches that should not prevent garbage collection, tracking object associations, or attaching metadata to objects without extending their lifetime. Values must be objects (WeakRef requirement — primitives throw at runtime). Iteration and get() silently skip collected entries. approximateSize may lag GC; call verify() for an accurate count or use has() which always checks liveness.

インストール

Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。

SKILL.md
readonly