Skip to content

Commit b366e65

Browse files
committed
Eslint fixes
1 parent 565431c commit b366e65

File tree

5 files changed

+8
-24
lines changed

5 files changed

+8
-24
lines changed

README.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,7 @@ See [Real Need](#RealNeed) for description of what the `total` and `risk` parame
7878
```js
7979
const { Entropy, charset16 } = require('entropy-string')
8080

81-
const entropy = new Entropy({ total: 1e6,
82-
risk: 1e9,
83-
charset: charset16 })
81+
const entropy = new Entropy({ total: 1e6, risk: 1e9, charset: charset16 })
8482
const string = entropy.string()
8583
```
8684

@@ -91,9 +89,7 @@ Custom characters may also be specified. Using uppercase hexadecimal characters:
9189
```js
9290
const { Entropy } = require('entropy-string')
9391

94-
const entropy = new Entropy({ total: 1e6,
95-
risk: 1e9,
96-
charset: '0123456789ABCDEF' })
92+
const entropy = new Entropy({ total: 1e6, risk: 1e9, charset: '0123456789ABCDEF' })
9793
const string = entropy.string()
9894
```
9995

@@ -195,9 +191,7 @@ Let's use `EntropyString` to help this developer generate 5 hexadecimal IDs from
195191

196192
```js
197193
const { Entropy, charset16 } = require('entropy-string')
198-
const entropy = new Entropy({ total: 10000,
199-
risk: 1000000,
200-
charset: charset16 })
194+
const entropy = new Entropy({ total: 10000, risk: 1000000, charset: charset16 })
201195
const strings = Array(5).fill('').map(e => entropy.string())
202196
```
203197

@@ -231,9 +225,7 @@ As another example, let's assume we need to ensure the names of about 30 items a
231225
```js
232226
const { Entropy, charset16, charset4 } = require('entropy-string')
233227

234-
const entropy = new Entropy({ total: 30,
235-
risk: 100000,
236-
charset: charset16 })
228+
const entropy = new Entropy({ total: 30, risk: 100000, charset: charset16 })
237229
const string = entropy.string()
238230
```
239231

examples/gen5.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
const { default: Entropy, charset16 } = require('./entropy')
22

3-
const entropy = new Entropy({ total: 10000,
4-
risk: 1000000,
5-
charset: charset16 })
3+
const entropy = new Entropy({ total: 10000, risk: 1000000, charset: charset16 })
64

75
const strings = Array(5).fill('').map(e => entropy.string())
86
console.log(`\n 5 IDs: ${strings.join(', ')}\n`)

examples/more_2.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ const {
77

88
console.log('\n 30 potential strings with 1 in a million risk of repeat: \n')
99

10-
const entropy = new Entropy({ total: 30,
11-
risk: 100000,
12-
charset: charset16 })
10+
const entropy = new Entropy({ total: 30, risk: 100000, charset: charset16 })
1311
let string = entropy.string()
1412
console.log(` Base 16: ${string}\n`)
1513

examples/tldr_2.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33

44
const { default: Entropy, charset16 } = require('./entropy')
55

6-
const entropy = new Entropy({ total: 1e6,
7-
risk: 1e9,
8-
charset: charset16 })
6+
const entropy = new Entropy({ total: 1e6, risk: 1e9, charset: charset16 })
97
const string = entropy.string()
108

119
console.log(`\n Potential 1 million random strings with 1 in a billion chance of repeat: ${string}\n`)

examples/tldr_3.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
const { default: Entropy } = require('./entropy')
44

5-
const entropy = new Entropy({ total: 1e6,
6-
risk: 1e9,
7-
charset: '0123456789ABCDEF' })
5+
const entropy = new Entropy({ total: 1e6, risk: 1e9, charset: '0123456789ABCDEF' })
86
const string = entropy.string()
97

108
console.log(`\n Custom uppercase hexadecimal characters: ${string}\n`)

0 commit comments

Comments
 (0)