# random-web

> Obtain cryptographically strong random bytes. For Browser.

Latest version **0.0.3** (published 2019-06-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install random-web
pnpm add random-web
yarn add random-web
bun add random-web
```

## Health

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

Positive: has types; no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2019-06-17 |
| First published | 2019-06-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Alexey Nalivaiko |
| Maintainers | nalliffunt |

## Links

- npm: https://www.npmjs.com/package/random-web
- Repository: https://github.com/NaLLiFFuNT/random-web
- Issues: https://github.com/NaLLiFFuNT/random-web/issues
- npm.io page: https://npm.io/package/random-web

## Recent versions

- 0.0.3 (latest) — 2019-06-17
- 0.0.2 — 2019-06-17
- 0.0.1 — 2019-06-17

## README

# Random-web
[![npm version](https://badge.fury.io/js/random-web.svg)](//npmjs.com/package/random-web) [![dependencies Status](https://david-dm.org/nalliffunt/random-web/status.svg)](https://david-dm.org/nalliffunt/random-web)


* It allows to obtain cryptographically strong random bytes.
* Suitable for browser usage.
* Dependency free


## Usage

With Typescript

```typescript
import {Random} from 'random-web';

Random.buffer(16) // return ArrayBuffer
Random.bytes(16) // return Uint8Array


// The Random provider interface

class Random {
    static buffer(size: number): ArrayBuffer;
    static bytes(size: number): Uint8Array;
    static fill(view: ArrayBufferView): ArrayBufferView;
    static string(length: number): string;
    static salt(bytes?: number): ArrayBuffer;
}


```

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