# rkey

> library for create random key

Latest version **1.0.2** (published 2024-04-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install rkey
pnpm add rkey
yarn add rkey
bun add rkey
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2024-04-12 |
| First published | 2024-04-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | surpri6e |
| Maintainers | surpri6e |
| Keywords | key, random, ts, js, random-string, string, random-key |

## Links

- npm: https://www.npmjs.com/package/rkey
- Repository: https://github.com/surpri6e/random-key
- Homepage: https://github.com/surpri6e/random-key#readme
- Issues: https://github.com/surpri6e/random-key/issues
- npm.io page: https://npm.io/package/rkey

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.2 (latest) — 2024-04-12
- 1.0.1 — 2024-04-06
- 1.0.0 — 2024-04-06

## README

[![npm version](https://img.shields.io/npm/v/rkey.svg?style=flat-square)](https://www.npmjs.org/package/rkey)
[![install size](https://img.shields.io/badge/dynamic/json?url=https://packagephobia.com/v2/api.json?p=rkey&query=$.install.pretty&label=install%20size&style=flat-square)](https://packagephobia.now.sh/result?p=rkey)
[![npm downloads](https://img.shields.io/npm/dy/rkey.svg?style=flat-square)](https://npm-stat.com/charts.html?package=rkey)

# RKey

Library for create random unique key. You can use it in ECMAScript and CommonJS projects.

## All structures

### TComponentsOfKey

```ts
export type TComponentsOfKey = 'numbers' | 'letters' | 'all';
```

### getRandomKey

```ts
type TGetRandomKeySignature = (length: number, components: TComponentsOfKey) => string;

/**
    Generate new unique key
    @param {number} length length of your key
    @param {TComponentsOfKey} components additional information about your key

    @returns {string} unique key
*/
export const getRandomKey: TGetRandomKeySignature = (length, components) => {...}
```

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