# @vs-org/random

> This is simple random string generator utility

Latest version **0.0.6** (published 2022-08-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install @vs-org/random
pnpm add @vs-org/random
yarn add @vs-org/random
bun add @vs-org/random
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2022-08-30 |
| First published | 2022-08-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 11.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Vaibhav Sarwade |
| Maintainers | vs-org |
| Keywords | Random generator, Random string generator, string generator, vs-random, vs random string generator |

## Links

- npm: https://www.npmjs.com/package/@vs-org/random
- Repository: git@github.com-personal:vaibhav-sarwade-404/vs-random
- Homepage: https://github.com/vaibhav-sarwade-404/vs-random#readme
- Issues: https://github.com/vaibhav-sarwade-404/vs-random/issues
- npm.io page: https://npm.io/package/@vs-org/random

## Alternatives

- [@mce/gif](https://npm.io/package/@mce/gif.md) — 2.6K weekly downloads
- [cleanse](https://npm.io/package/cleanse.md) — 173 weekly downloads
- [str](https://npm.io/package/str.md) — 127 weekly downloads
- [naming](https://npm.io/package/naming.md) — 95 weekly downloads
- [tap-telco-api](https://npm.io/package/tap-telco-api.md) — 19 weekly downloads

## Recent versions

- 0.0.6 (latest) — 2022-08-30
- 0.0.5 — 2022-08-29
- 0.0.4 — 2022-08-29
- 0.0.3 — 2022-08-29
- 0.0.2 — 2022-08-29
- 0.0.1 — 2022-08-29

## README

# VS Random

This is simple random character generator utility

## Usage

1. Generate random numbers

```
   const random = required("@vs/random");
   const randomNumbers = random({ length: 6, type: "numbers" });

   output: "063367"

```

2. Generate random string with upper case alphabet

```
   const random = required("@vs/random");
   const randomString = random({ length: 6, type: "uppercase" });

   output: "PJIBBA"
```

3. Generate random string with lower case alphabet

```
   const random = required("@vs/random");
   const randomString = random({ length: 6, type: "lowercase" });

   output: "ochdid"
```

4. Generate random string with default random charset

```
   const random = required("@vs/random");
   const randomString = random({ length: 6, type: "random" });

   output: "RCIhj/"
```

5. Generate random string with custom charset

```
   const random = required("@vs/random");
   const randomString = random({ length: 6, charset: "ABCDuifj987)(.:" });

   output: "jC8(i8"
```

## Options

| option                              | Description                                                                                                                                                           |
| ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `type: numbers`                     | Generate random number, but returns as string                                                                                                                         |
| `type: uppercase`                   | Generate randomg string with only upper case alphabet                                                                                                                 |
| `type: lowercase`                   | Genearte random string with only lowercase alphabet                                                                                                                   |
| `type: symbols`                     | Generate random stgring with only symbols (from default charset)                                                                                                      |
| `type: random`                      | Generate random string with all above values (depends on length of string to include all chars). It does not mean it will atleast include one char from above options |
| `charset: {custom char set}`        | Generates random string from custom, note if charset is provided it takes priority over above options charset                                                         |
| `length: {length of random string}` | Generates random string with above options of this length                                                                                                             |

## License

MIT (see [LICENSE](https://github.com/vaibhav-sarwade-404/vs-random/blob/main/LICENSE))

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