Skip to content

Commit

Permalink
Create random-org-http/README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
KSXGitHub committed Jul 27, 2018
1 parent 8d94490 commit 2339a51
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions packages/typescript/random-org-http/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# random-org-http

[Random.org](https://random.org) via [HTTP Interface](https://www.random.org/clients/http/)

## Requirements

* Node ≥ 8.9.0

## Usage

### Random Integers

```javascript
import {integer, Base} from 'random-org-http'

const result = await integer({
base: Base.decimal,
col: 3,
min: 1,
max: 32,
num: 9
})

console.log(result)
```

This will print an array of 9 random integers within range [1, 32].

### Random Ordered Sequence

```javascript
import {sequence} from 'random-org-http'

const result = await sequence({
min: 10,
max: 100
})

console.log(result)
```

This will print an array of all integers within range [10, 100] in random order.

### Random Strings

```javascript
import {string} from 'random-org-http'

const result = await string({
num: 7,
len: 12,
unique: false,
digits: false,
upperalpha: true,
loweralpha: false
})

console.log(result)
```

This will print an array of 7 random strings consist of 12 uppercase characters.

## License

[MIT](https://git.io/vhaEz) © [Hoàng Văn Khải](https://github.com/KSXGitHub)

0 comments on commit 2339a51

Please sign in to comment.