1.0.3 • Published 2 years ago

uni-random v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

uni-random

A simple javascript libary for generating random string

Installation

To install uni-random, use npm:

npm install uni-random

Usage

import uniRandom from "uni-random";

uniRandom();
// >> "z3odKHvQpFoZZ0w"

uniRandom({
  length: 20,
  charset: 'alphanumeric',
  capitalization: null
});
// >> "CaIDjM0ZbH5smjiKFk9W"

uniRandom({
  charset: 'github',
});
// >> "tgghubuhhbibbgi"

API

  • uniRandom(options)
    • options
      • length - the length of the random string. (default: 15) OPTIONAL
      • charset - define the character set for the string. (default: 'alphanumeric') OPTIONAL
      • capitalization - define whether the output should be lowercase / uppercase only. (default: null) OPTIONAL
        • lowercase
        • uppercase

LICENSE

uni-random is licensed under the MIT license.

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago