js-set-map-lookups
CommunityFast O(1) membership checks with Set/Map.
AuthorTheOrcDev
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill replaces repeated O(n) membership tests performed with array.includes() by using native Set/Map lookups, delivering faster performance in data processing tasks.
Core Features & Use Cases
- Use Set.has and Map.has for constant-time membership checks.
- Seamlessly convert array-based lookups to Set/Map lookups in existing code.
- Use Case: efficiently filter large collections by an allowed-id set or validate items against a permitted set.
Quick Start
Replace a typical array.includes membership test with Set.has by initializing a Set with the allowed identifiers and using has() in the lookup, e.g., new Set(['a','b',...]) and items.filter(item => allowed.has(item.id)).
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: js-set-map-lookups Download link: https://github.com/TheOrcDev/8bitcn-ui/archive/main.zip#js-set-map-lookups Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.