Small Collection Utilities

Four small helpers worth carrying in a shared module, each with the one way it misleads — a symmetric set difference for diffing two id sets, a position index for constant-time lookups, a tolerant parse/serialize pair for timestamped tokens that returns null instead of throwing, and a translator that rewrites an external link into your own scheme. Use when a diff reports every item as changed, when a position lookup returns the wrong index for a repeated element, when one malformed line takes down a whole screen, or when pasting a link into a search box searches for the link.

maxrave-dev fd99c91 7.2 KB Updated

File contents

maxrave-dev/kotlin-footguns/tree/main/skills/small-collection-utilities commit fd99c91252

Frequently asked questions

npx skillmds@latest add maxrave-dev/small-collection-utilities