{"_id":"@bensjoberg/fnv1a","_rev":"2-29d5c735c926fe1fad40b9911fddf5fb","name":"@bensjoberg/fnv1a","dist-tags":{"latest":"3.0.0"},"versions":{"3.0.0":{"name":"@bensjoberg/fnv1a","version":"3.0.0","description":"FNV-1a non-cryptographic hash function","license":"MIT","repository":{"type":"git","url":"git+https://github.com/bensjoberg/fnv1a.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"commonjs","main":"./index.js","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"test":"xo && ava && tsd"},"keywords":["fnv1a","fnv-1a","fnv1","fnv-1","fnv","algorithm","hash","hashing","string","function","fowler–noll–vo","fowler","noll","vo","unicode","bigint"],"devDependencies":{"ava":"3.15.0","tsd":"0.17.0","xo":"0.44.0"},"types":"./index.d.ts","gitHead":"a37e106475b03e9c5e0d9901e8706e204e8bff8a","bugs":{"url":"https://github.com/bensjoberg/fnv1a/issues"},"homepage":"https://github.com/bensjoberg/fnv1a#readme","_id":"@bensjoberg/fnv1a@3.0.0","_nodeVersion":"16.11.1","_npmVersion":"8.0.0","dist":{"integrity":"sha512-uENnsvSKGAKIsDcKBzLszB2JemGDVuZE3v8lF4Bf+vDNnxLjN+OCaVNQcz5CZGw8FsJ8ddp897rFz66QtCKphA==","shasum":"d5300c58c95b708bf669ae6224509e0f6ec1f9c3","tarball":"https://registry.npmjs.org/@bensjoberg/fnv1a/-/fnv1a-3.0.0.tgz","fileCount":5,"unpackedSize":6541,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhzHiCCRA9TVsSAnZWagAAKr4P/1P2S2EQCDsxBE5s1kPj\nWrrpPa1u/fdJRukFGOVSLf0XDbUA17OErbSxHEFxcjEBTJj/JGAvlbFOQyha\n2DW2TrxaQDxEr9c+VDFACQlP/OaKFpOVR9RI1xrVEqxs1AXBwpj6YDydRrqZ\nGiW0xqVyn/T6FuXiffQr3/XSN0DAeaH9+kuM3vQn5F3MsbM/Utii+rKobkZ2\nbEcgMzODFESpjBYolPjEBQj1W7jFp4r5i3852eiHswDUGevaNAGhYTHu/jeD\nqtTynibz3J7+iGNKXW9yW8e/KegbOpo0E+Xo4uJRofWH4Lla2gQCaUnJhNdR\nsIXcAZ3EUyhrjwu7oxiU+GR/p2hlVWfdccbteitSH0kuKK5m3fr+tjAQZDeK\n3/gqYxy5myuAahp60CnfvF5w/TjMQEXHdunnftDd9bsL9gIGfmVfvk1j8v0G\noSJ6xlqqq93N1VtujONmoNxEK7wEprmH49cb4Zft57r305h+hXccQd+xgqH+\nu/nGv+XJeA7wKXY/fXgPaTtiClRES87vqcbZjAOnA5U+1rL1BA4bznfaKjtc\nv7p8z2b+0ro0mYwf+raIJDxk4HZvq7wyLIfuu0HO5cOBbMEZ4sQr5vsl/8LS\ngX3+T6KL1TYLT4Q0X+W+QgWmWSzol72GUgDjKmQ9g3hVKompiVWdkFJU5LIw\nVJYw\r\n=oMAL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBXpgSk5NEGukMlAeAERAlZdeXwWY7j3EoBsM+LlCHQfAiAw34+CJqwhG2YAYOY5uzA/7dQsU/6v7Mk/6M2l21u9gg=="}]},"_npmUser":{"name":"bensjoberg","email":"bensjoberg@gmail.com"},"directories":{},"maintainers":[{"name":"bensjoberg","email":"bensjoberg@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fnv1a_3.0.0_1634226023746_0.5296287125828372"},"_hasShrinkwrap":false}},"time":{"created":"2021-10-14T15:40:23.694Z","3.0.0":"2021-10-14T15:40:23.878Z","modified":"2022-04-04T18:23:54.546Z"},"maintainers":[{"name":"bensjoberg","email":"bensjoberg@gmail.com"}],"description":"FNV-1a non-cryptographic hash function","homepage":"https://github.com/bensjoberg/fnv1a#readme","keywords":["fnv1a","fnv-1a","fnv1","fnv-1","fnv","algorithm","hash","hashing","string","function","fowler–noll–vo","fowler","noll","vo","unicode","bigint"],"repository":{"type":"git","url":"git+https://github.com/bensjoberg/fnv1a.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"bugs":{"url":"https://github.com/bensjoberg/fnv1a/issues"},"license":"MIT","readme":"# Forked\n\nForked from https://github.com/sindresorhus/fnv1a and ported to CommonJS. (I really want to move to ESM, but my work has a couple projects that just aren't ready for it yet. 😢)\n\n# fnv1a\n\n> [FNV-1a](https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function) non-cryptographic hash function\n\n[FNV-1a has outstanding distribution and collisions are rare.](https://softwareengineering.stackexchange.com/questions/49550/which-hashing-algorithm-is-best-for-uniqueness-and-speed/145633#145633)\n\nFNV hashes are designed to be fast while maintaining a low collision rate. The FNV speed allows one to quickly hash lots of data while maintaining a reasonable collision rate. The high dispersion of the FNV hashes makes them well suited for hashing nearly identical strings such as URLs, hostnames, filenames, text, IP addresses, etc.\n\n## Install\n\n```\n$ npm install @sindresorhus/fnv1a\n```\n\n## Usage\n\n```js\nimport fnv1a from '@sindresorhus/fnv1a';\n\nfnv1a('🦄🌈', {size: 32});\n//=> 2868248295n\n\nfnv1a('🦄🌈', {size: 128});\n//=> 13487074350300261116944693128525960095n\n\nNumber(fnv1a('🦄🌈', {size: 32}));\n//=> 2868248295\n```\n\n## API\n\n### fnv1a(string, options?)\n\nReturns the hash as a positive `BigInt`.\n\nIf you need it as a `number`, use `32` as `size` and wrap the return value in `Number(…)`.\n\n#### options\n\nType: `object`\n\n##### size\n\nType: `number`\\\nValues: `32 | 64 | 128 | 256 | 512 | 1024`\\\nDefault: `32`\n\nThe bit size of the hash.\n\n## Related\n\n- [djb2a](https://github.com/sindresorhus/djb2a) - DJB2a non-cryptographic hash function\n- [sdbm](https://github.com/sindresorhus/sdbm) - SDBM non-cryptographic hash function\n","readmeFilename":"readme.md"}