# ascii-hash

> Fast and naive non-cryptographic hash.

Latest version **1.0.0** (published 2022-03-23) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2022-03-23 |
| First published | 2022-03-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Louis Sandoval |
| Maintainers | lousando |
| Keywords | rapid, hash, fast, easy, quick |

## Links

- npm: https://www.npmjs.com/package/ascii-hash
- npm.io page: https://npm.io/package/ascii-hash

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2022-03-23

## README

# ascii-hash

### Fast and naive non-cryptographic hash.

Calculates the sum of each character in a string using their
character (ASCII) codes. This makes it a computationally cheap
way to create relatively unique IDs. Use cases could include React `key`
generation or the creation of a few user IDs.

## Installation

```bash
npm i ascii-hash
# or
yarn add ascii-hash
```

## Usage

```js
const { asciiHash } = require("ascii-hash");

asciiHash("hello world!") // "1149"
```

For better performance with consecutive calls 
(such as in a React render method), consider using the 
memoized version which caches previous results in memory.

```js
const { asciiHashMem } = require("ascii-hash");

asciiHashMem("hello world!") // "1149"
```

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