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

murmur-string-hash-kit

v0.1.0

Published

Small browser-friendly MurmurHash3 x86_32 helpers for UTF-8 strings.

Readme

murmur-string-hash-kit

License: MPL-2.0 CI

Small TypeScript helpers for deterministic MurmurHash3 x86_32 hashes of UTF-8 strings.

It is intended for browser-safe bucketing, cache keys, feature rollout buckets, fixture IDs, and non-cryptographic fingerprints. It has no runtime dependency and does not use Node-only APIs.

Demo

Try the browser preview: packages.wasta-wocket.fr/murmur-string-hash-kit.

Package quality

  • TypeScript types are generated from the source.
  • ESM-only package with no runtime dependencies.
  • Marked as side-effect free for bundlers.
  • CI runs npm ci, typecheck, build, and test.
  • Tested on Node.js 20 and 22 with GitHub Actions.
  • Browser-friendly implementation with no Node-only APIs.
import { hashString, hashStrings } from "murmur-string-hash-kit";

hashString("café", { seed: 42 });
// { value: 1990984759, hex: "76af9d77", base36: "wxux1z", seed: 42, bytes: 5 }

hashStrings(["alpha", "beta"], { seed: 7 });
// [{ input: "alpha", ... }, { input: "beta", ... }]

API

hashString(input, options?)

Returns a structured hash result:

  • value: unsigned 32-bit integer.
  • hex: zero-padded 8-character hexadecimal string.
  • base36: compact lowercase base36 string.
  • seed: normalized unsigned 32-bit seed.
  • bytes: UTF-8 byte length used for hashing.

Options:

  • seed: integer seed, default 0.
  • maxBytes: optional cap for untrusted input. No cap is applied by default.

hashStringToUint32(input, options?)

Returns only the unsigned 32-bit integer.

hashStringToHex(input, options?)

Returns only the zero-padded hexadecimal string.

hashStrings(inputs, options?)

Hashes many strings while preserving the original input beside each result.

Notes

This package implements only MurmurHash3 x86_32. It deliberately does not implement x64 or 128-bit variants, because the first draft targets the common browser-friendly string fingerprint case.

MurmurHash3 is not cryptographic. Do not use it for passwords, signatures, secrets, or adversarial integrity checks.

The implementation hashes UTF-8 bytes, not UTF-16 code units. It includes independent x86_32 vectors covering embedded nulls, endian-sensitive chunks, tail lengths, non-ASCII text, and long strings.