# @marshal93/random-string

> Storage - use random-string with types

Latest version **0.1.3** (published 2026-05-12) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 55/100 (C)** — status: active.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2026-05-12 |
| First published | 2023-04-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | marshal93 |
| Maintainers | marshal93 |
| Keywords | random-string |

## Links

- npm: https://www.npmjs.com/package/@marshal93/random-string
- Repository: git:+https://github.com/marshal-base/base
- Homepage: https://github.com/marshal-base/base/tree/master/packages-utils/random-string
- npm.io page: https://npm.io/package/@marshal93/random-string

## 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.1.3 (latest) — 2026-05-12
- 0.1.2 — 2026-05-11
- 0.1.1 — 2023-05-05
- 0.1.0 — 2023-04-23

## README

# @marshal93/random-string

获取一个随机字符串，默认获取 6 位字符，默认字符集合 `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`

## EXAMPLE

使用
```js
import randomString from '@marshal93/random-string';

randomString();
// 更改长度
randomString(2);
// 更改长度和随机集合
randomString(3, '0123456789');
```

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