# hashed-release-name

> Generate a simple project release name from a hash (Git, MD5, SHA1 etc.)

Latest version **1.0.2** (published 2022-09-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install hashed-release-name
pnpm add hashed-release-name
yarn add hashed-release-name
bun add hashed-release-name
```

## 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.2 |
| Published | 2022-09-27 |
| First published | 2018-02-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >8.0.0 |
| Dependencies | 2 |
| Unpacked size | 32 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Matt Carter |
| Maintainers | hash-bang |
| Keywords | hash, hashed, release, release, name, project, name, version, name |

## Links

- npm: https://www.npmjs.com/package/hashed-release-name
- Repository: https://github.com/hash-bang/hashed-release-name
- Homepage: https://github.com/hash-bang/hashed-release-name#readme
- Issues: https://github.com/hash-bang/hashed-release-name/issues
- npm.io page: https://npm.io/package/hashed-release-name

## Dependencies (2)

- [lodash](https://npm.io/package/lodash.md) ^4.17.5
- [seed-random](https://npm.io/package/seed-random.md) ^2.2.0

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 1.0.2 (latest) — 2022-09-27
- 1.0.1 — 2020-03-08
- 1.0.0 — 2018-02-28

## README

hashed-release-name
===================
Generate a human readable release name based on a hash.

This project is based on the [project-name-generator](https://www.npmjs.com/package/project-name-generator) NPM module which unfortunately does not a random seed.


```javascript
var hrn = require('hashed-release-name');

console.log(hrn()); //= Something like 'fruity wombat'

console.log(hrn({alliterative: true})); //= Something like 'chalky clown'

console.log(hrn({hash: 123, alliterative: true})); //= Something like 'mushy mastadon' (but will ALWAYS return the same result unless the hash changes)
```


API
===
This module returns a single function which can be called as `([hash], [options])`.

Options is an object which can contain any of the below:

| Option               | Type                | Default                  | Description                                                                                                          |
|----------------------|---------------------|--------------------------|----------------------------------------------------------------------------------------------------------------------|
| `hash`               | `string`            | `Date.now()`             | Alternate way to specify the hash                                                                                    |
| `alliterative`       | `boolean`           | `false`                  | boolean Generated name should be alliterative (e.g. 'wicked wombat')                                                 |
| `adjectives`         | `string` or `array` | `./data/adjectives.json` | A word list of adjectives, if this is a string the file path specified will be processed as JSON                     |
| `nouns`              | `string` or `array` | `./data/nouns.json`      | A word list of nouns, if this is a string the file path specified will be processed as JSON                          |
| `sampler`            | `function`          | (See code)               | Function called as `(list, settings)` to return a random choice from a word list                                     |
| `samplerAlliterative` | `function`          | (See code)               | Function called as `(list, settings, firstChar)` to return a random choice from a word list, limited by alliteration |
| `mapper`             | `function`          | `word => word`           | Additional transforms to apply on a per-word basis to the output                                                     |
| `joiner`             | `string`            | `" "`                    | String sequence to join the generated terms by                                                                       |
| `transformer`        | `string` `          | phrase => phrase`        | Function to run the whole generated phrase though before returning                                                   |

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