# short-hash

> Get a short hash from a string. Uses Bernstein's popular 'times 33' hash algorithm but returns a hex string instead of a number

Latest version **1.0.0** (published 2015-08-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install short-hash
pnpm add short-hash
yarn add short-hash
bun add short-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.0.0 |
| Published | 2015-08-26 |
| First published | 2015-08-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/short-hash) |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13 |
| Author | Joakim Carlstein |
| Maintainers | joakimbeng |

## Links

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

## Dependencies (1)

- [hash-string](https://npm.io/package/hash-string.md) ^1.0.0

## Recent versions

- 1.0.0 (latest) — 2015-08-26

## README

# short-hash

[![NPM version][npm-image]][npm-url] [![js-xo-style][codestyle-image]][codestyle-url]

> Get a short hash from a string. Uses Bernstein's popular "times 33" hash algorithm but returns a hex string instead of a number

This is just a convenient wrapper around [`hash-string`](https://www.npmjs.com/package/hash-string).

## Installation

Install `short-hash` using [npm](https://www.npmjs.com/):

```bash
npm install --save short-hash
```

## Usage

### Module usage

```javascript
var shortHash = require('short-hash');

shortHash('a string to hash...');
```

## API

### `shortHash(str)`

| Name | Type | Description |
|------|------|-------------|
| str | `String` | The string to hash |

Returns: `String`, a hexadecimal string.

## License

MIT

[npm-url]: https://npmjs.org/package/short-hash
[npm-image]: https://badge.fury.io/js/short-hash.svg
[codestyle-url]: https://github.com/sindresorhus/xo
[codestyle-image]: https://img.shields.io/badge/code%20style-xo-brightgreen.svg?style=flat

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