js-set-map-lookups

Use Set/Map for O(1) Lookups

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "js-set-map-lookups" with this command: npx skills add theorcdev/8bitcn-ui/theorcdev-8bitcn-ui-js-set-map-lookups

Use Set/Map for O(1) Lookups

Convert arrays to Set/Map for repeated membership checks.

Incorrect (O(n) per check):

const allowedIds = ['a', 'b', 'c', ...] items.filter(item => allowedIds.includes(item.id))

Correct (O(1) per check):

const allowedIds = new Set(['a', 'b', 'c', ...]) items.filter(item => allowedIds.has(item.id))

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

fumadocs-mdx-structure

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

rendering-animate-svg

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

8-bit-pixel-art-patterns

No summary provided by upstream source.

Repository SourceNeeds Review