rkey
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

npm version install size npm downloads

RKey

Library for create random unique key. You can use it in ECMAScript and CommonJS projects.

All structures

TComponentsOfKey

export type TComponentsOfKey = 'numbers' | 'letters' | 'all';

getRandomKey

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) => {...}

Package Sidebar

Install

npm i rkey

Weekly Downloads

2

Version

1.0.2

License

MIT

Unpacked Size

6.83 kB

Total Files

13

Last publish

Collaborators

  • surpri6e