# string-hash

> fast string hashing function

Latest version **1.1.3** (published 2017-02-11) · CC0-1.0 license · 0 weekly downloads

## Install

```sh
npm install string-hash
pnpm add string-hash
yarn add string-hash
bun add string-hash
```

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2017-02-11 |
| First published | 2012-11-20 |
| Weekly downloads | 0 |
| License | CC0-1.0 |
| TypeScript types | separate (@types/string-hash) |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 306 |
| Author | The Dark Sky Company |
| Maintainers | darkskyapp |
| Keywords | string, hashing |

## Links

- npm: https://www.npmjs.com/package/string-hash
- Repository: https://github.com/darkskyapp/string-hash
- Homepage: https://github.com/darkskyapp/string-hash#readme
- Issues: https://github.com/darkskyapp/string-hash/issues
- npm.io page: https://npm.io/package/string-hash

## Alternatives

- [@gemini-wallet/core](https://npm.io/package/@gemini-wallet/core.md) — 515.6K weekly downloads
- [utility](https://npm.io/package/utility.md) — 416.6K weekly downloads
- [@primno/dpapi](https://npm.io/package/@primno/dpapi.md) — 7.2K weekly downloads
- [pi-readseek](https://npm.io/package/pi-readseek.md) — 3.7K weekly downloads
- [@emilia-protocol/verify](https://npm.io/package/@emilia-protocol/verify.md) — 1.1K weekly downloads

## Recent versions

- 1.1.3 (latest) — 2017-02-11
- 1.1.2 — 2017-02-11
- 1.1.1 — 2016-11-28
- 1.1.0 — 2012-11-20

## README

string-hash
===========

A fast string hashing function for Node.JS. The particular algorithm is quite
similar to `djb2`, by Dan Bernstein and available
[here](http://www.cse.yorku.ca/~oz/hash.html). Differences include iterating
over the string *backwards* (as that is faster in JavaScript) and using the XOR
operator instead of the addition operator (as described at that page and
because it obviates the need for modular arithmetic in JavaScript).

The hashing function returns a number between 0 and 4294967295 (inclusive).

Thanks to [cscott](https://github.com/cscott) for reminding us how integers
work in JavaScript.

License
-------

To the extend possible by law, The Dark Sky Company, LLC has [waived all
copyright and related or neighboring rights][cc0] to this library.

[cc0]: http://creativecommons.org/publicdomain/zero/1.0/

---
_Source: https://npm.io/package/string-hash · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
