npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@muggridge/substrate

v0.1.4

Published

Core substrate utilities.

Readme

@muggridge/substrate

High-performance, allocation-sensitive utility primitives and data structures optimized for the V8/JSC runtime.

Core Feature Checklist

  • [ ] Enum - Smi-backed, boundary-checked execution backbone to replace standard string/object enums.

    • [ ] has: Type-guard via fast integer bounds verification.
    • [ ] derive: Tightly-packed, hole-free sequential lookup structures.
    • [ ] associate: Map human-readable tokens to integer variants without runtime lookup cost.
    • [ ] match: Exhaustive variant matching against switch-case matrices.
    • [ ] matchPartial: Non-exhaustive matching with fallback traps.
  • [ ] Flags

    • Bitfield bitmask implementation for zero-allocation permission and state calculation ($1 \ll 0, 1 \ll 1$).
  • [ ] View

    • Zero-copy, fat pointer abstraction providing ergonomic slicing across standard ArrayLike buffers.
    • [ ] from: Wrap an existing backing buffer without memory duplication.
    • [ ] get: Bound-checked index access with offset scaling.
    • [ ] forEach, map, filter: Iteration loops passing views without array reallocation.
  • [ ] Result

    • Idiomatic error-handling variant to eliminate try/catch optimization blocks and deoptimization penalties in V8/JSC.
    • [ ] isOk / isErr: Monomorphic, shape-stable type-guards.
    • [ ] from / fromAsync: Intercept standard exception-throwing APIs into safe tracking structures.
    • [ ] map / mapErr: Structural mutations passing data variants seamlessly.
    • [ ] unwrap / unwrapOr: Direct evaluation extraction with predictable fallback mechanisms.
    • [ ] match: Fast-path structural or positional matching to minimize allocation.
  • [ ] Option

    • Null/undefined avoidance wrapper utilizing predictable memory structures.
    • [ ] some / none: Primitive wrapper factories (utilizing a shared None singleton asset).
    • [ ] isSome / isNone: Shape-stable type-guards.
    • [ ] map / match / unwrapOr: Safe mutation and transformation pipelines.
  • [ ] Rng

    • High-performance, seeded PRNG utilizing the Xoshiro algorithm.
    • [ ] next: Generate unboxed pseudo-random float sequences.
    • [ ] integer: Inclusive min/max discrete integer generation.
    • [ ] shuffle: In-place array mutation avoiding internal structural array re-allocations.
  • [ ] Range

    • Memory-less, bidirectional numeric indexing ranges (range(start, end)). Supports forward and reverse progressions without sparse array generation or resizing taxes.
  • [ ] PooledIterator

    • Universal, shape-stable iterator implementing Iterator and IteratorResult simultaneously. Utilizes an internal Pool buffer to eliminate { value, done } heap allocations in for...of execution loops. Completely resets on loop completion or early runtime loop termination.
  • [ ] Concur

    • Lazy evaluation streaming architecture utilizing structural pipelining. Up to 47,000x faster and 99% less heap allocation intensive than native array method chaining.
    • [ ] Native fluent-style API mapping (.filter.map.skip.take.toArray).

Collections Checklist

  • [ ] Vector (Contiguous, size-managed arrays)
  • [ ] LinkedList / DoublyLinkedList
  • [ ] RingBuffer (Fixed-size cyclic tracking structures)
  • [ ] Heap (Monomorphic Min/Max binary priority arrays)
  • [ ] Radix Trie (String & Buffer key prefixes)

Subsystems

  • [ ] Type
    • A zero-dependency validation framework engineered to replace Zod with up to 26x faster execution paths by targeting optimized V8 shape models.
  • [ ] Serializer
    • Schema-driven serialization system using JIT-compiled deserialization. Bypasses dynamic Object.defineProperties manipulation to retain fast-property hidden classes on decoded outputs.

TBD

  • Defer / using helper

  • Memo

  • EventEmitter

  • BiMap: two way key-value lookup

  • LruCache

  • Arena

  • Chunked Arena

  • BitSet

  • HashMap (Monomorphic Flat Object Hash)

  • SparseSet

Bloom Filter: A probabilistic structure that tells you if an item is definitely not in a set. Extremely memory efficient and fits your "avoid allocation/expensive lookups" theme.

B-Tree or AVL Tree: While you have a Radix Trie, a balanced search tree is necessary for range queries on non-sequential keys.

Reference Counting (Rc / Arc): If you have ResourceCell, you eventually need a way to track how many systems are holding a reference to that cell before it can be returned to the pool.