Catalog npm
Back to packageRELEASE DETAILS

1.0.0

npm

05h

Stable 32-bit string hash (FNV-1a) with a bucketing helper. Zero dependencies.

bucketdeterministicfnvfnv1ahashshard
Published11 Sept 2026
Direct dependencies0
Transitive dependenciesNot calculated

README

Current package documentation

05h

Stable 32-bit string hash (FNV-1a) with a bucketing helper. Zero dependencies.

Same input always yields the same unsigned 32-bit integer on every platform and every Node version — suitable for stable sharding, cache keys and reproducible (seeded) ordering.

const hash = require('05h');

hash('hello');          // 1335831723
hash('hello');          // 1335831723   (always the same)
hash('hello', 100);     // 23           (in [0, 100))
hash.bucket('id', 8);   // 0..7         (shard index)

API

hash(value, modulo?)

ArgumentTypeDescription
valuestringInput. Non-strings are coerced with String().
modulonumber?When given, the result is reduced into [0, modulo). Invalid moduli are ignored.

Returns an unsigned 32-bit number.

hash.bucket(value, buckets)

Convenience wrapper returning a stable index in [0, buckets).

Notes

Not a cryptographic hash — do not use it for security purposes.

License

MIT

Downloads & popularity

5downloads
7-day window · source-reported counts23 Oct 2026
52.50
2026-10-23: 5 · observed 2026-10-23T19:51:31.1008651Z
23 Oct23 Oct

npm · 1 observations shown. Missing days are unknown.

View observed values
Date / source periodValueObserved at
2026-10-2352026-10-23T19:51:31.1008651Z

Declared dependencies 0

Native requirements
0 direct targetsNot calculated transitive count
No declared dependencies in this collected response

Declarations describe requirements; they are not a resolved dependency graph.

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-kOSRrrSb/FYQZo1q9IIUimKj7+8CcIqEUfW8zCusJkyKRb8ftdcs2WdApv5bf+83Jeg228B9Y+3O596DZq/WHw==",
  "shasum": "77ac4d43696bb2e41f296a7ea67a369bf9e6efbc",
  "tarball": "https://registry.npmjs.org/05h/-/05h-1.0.0.tgz",
  "fileCount": 5,
  "unpackedSize": 4191,
  "signatures": [
    {
      "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U",
      "sig": "MEYCIQCmzQt6uc9geYWZh5ylwxlZbfpj2NxOS0uMdKXm5BIP2QIhAJL4PjmbxX6+OoxI5GoFjD5zOBom0f8ALHpQXQD0UruH"
    }
  ]
}

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 17:19 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:37b36659e4c726ab2d6fec609f57d4fbc4b920b6f6e247c5e69578a3630f71db

Other collected versions

View all collected versions →