# @types/random-string

> TypeScript definitions for random-string

Latest version **0.2.0** (published 2024-09-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/random-string
pnpm add @types/random-string
yarn add @types/random-string
bun add @types/random-string
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2024-09-24 |
| First published | 2016-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51449 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/random-string
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/random-string
- npm.io page: https://npm.io/package/@types/random-string

## Recent versions

- 0.2.0 (latest) — 2024-09-24
- 0.0.31 (ts4.7) — 2023-11-07
- 0.0.28 (ts3.7) — 2016-09-19
- 0.0.30 — 2023-10-18
- 0.0.29 — 2023-09-27
- 0.0.27 — 2016-07-14
- 0.0.26-alpha — 2016-07-08
- 0.0.25-alpha — 2016-07-04
- 0.0.24-alpha — 2016-07-02
- 0.0.23-alpha — 2016-07-01
- 0.0.22-alpha — 2016-07-01
- 0.0.21-alpha — 2016-05-25
- 0.0.20-alpha — 2016-05-20
- 0.0.15-alpha — 2016-05-19
- 0.0.14-alpha — 2016-05-17

## README

# Installation
> `npm install --save @types/random-string`

# Summary
This package contains type definitions for random-string (https://github.com/valiton/node-random-string).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/random-string.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/random-string/index.d.ts)
````ts
declare namespace randomString {
    interface RandomStringOptions {
        /**
         * The length of your resulting string
         * @default 8
         */
        length?: number | undefined;

        /**
         * Should your resulting string contain numbers
         * @default true
         */
        numeric?: boolean | undefined;

        /**
         * Should your resulting string contain letters (from a-z, lower and uppercase)
         * @default true
         */
        letters?: boolean | undefined;

        /**
         * Should your resulting string contain any of these special characters (!$%^&*()_+|~-=`{}[]:;<>?,./)
         * @default false
         */
        special?: boolean | undefined;

        /**
         * Removes characters from resulting string.
         * Note: Lowercase letters will not remove uppercase letters.
         * @default []
         */
        exclude?: string[] | undefined;
    }
}

declare function randomString(options?: randomString.RandomStringOptions): string;

export = randomString;

````

### Additional Details
 * Last updated: Tue, 24 Sep 2024 17:37:38 GMT
 * Dependencies: none

# Credits
These definitions were written by [Sam Saint-Pettersen](https://github.com/stpettersens).

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