{"_id":"05h","name":"05h","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"05h","version":"1.0.0","description":"Stable 32-bit string hash (FNV-1a) with a bucketing helper. Zero dependencies.","main":"index.js","types":"index.d.ts","keywords":["hash","fnv","fnv1a","bucket","shard","deterministic"],"license":"MIT","author":{"name":"iceywu","email":"3128006406@qq.com"},"engines":{"node":">=14"},"_id":"05h@1.0.0","_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"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"}]},"_npmUser":{"name":"levwu","email":"levwume@gmail.com"},"directories":{},"maintainers":[{"name":"levwu","email":"levwume@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/05h_1.0.0_1789122386327_0.7109121342548497"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-11T10:26:26.144Z","1.0.0":"2026-09-11T10:26:26.458Z","modified":"2026-09-11T10:26:26.696Z"},"maintainers":[{"name":"levwu","email":"levwume@gmail.com"}],"description":"Stable 32-bit string hash (FNV-1a) with a bucketing helper. Zero dependencies.","keywords":["hash","fnv","fnv1a","bucket","shard","deterministic"],"author":{"name":"iceywu","email":"3128006406@qq.com"},"license":"MIT","readme":"# 05h\n\nStable 32-bit string hash (FNV-1a) with a bucketing helper. Zero dependencies.\n\nSame input always yields the same unsigned 32-bit integer on every platform and\nevery Node version — suitable for stable sharding, cache keys and reproducible\n(seeded) ordering.\n\n```js\nconst hash = require('05h');\n\nhash('hello');          // 1335831723\nhash('hello');          // 1335831723   (always the same)\nhash('hello', 100);     // 23           (in [0, 100))\nhash.bucket('id', 8);   // 0..7         (shard index)\n```\n\n## API\n\n### `hash(value, modulo?)`\n\n| Argument | Type | Description |\n|---|---|---|\n| `value` | `string` | Input. Non-strings are coerced with `String()`. |\n| `modulo` | `number?` | When given, the result is reduced into `[0, modulo)`. Invalid moduli are ignored. |\n\nReturns an unsigned 32-bit `number`.\n\n### `hash.bucket(value, buckets)`\n\nConvenience wrapper returning a stable index in `[0, buckets)`.\n\n## Notes\n\nNot a cryptographic hash — do not use it for security purposes.\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-ee5c1993fec9dac3d1735c8bf7caa739"}