Skip to content

Commit 05b9a21

Browse files
committed
Yarn upgrade
1 parent ef0dd2c commit 05b9a21

File tree

3 files changed

+108
-129
lines changed

3 files changed

+108
-129
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ You may, of course, want to choose the characters used, which is covered next in
333333
Being able to easily generate random strings is great, but what if you want to specify your own characters. For example, suppose you want to visualize flipping a coin to produce entropy of 10 bits.
334334

335335
```js
336-
import {Random, charSet2} from './entropy-string'
336+
import {Random, charSet2} from 'entropy-string'
337337

338338
let random = new Random(charSet2)
339339
let flips = random.string(10)
@@ -353,7 +353,7 @@ The resulting string of __0__'s and __1__'s doesn't look quite right. Perhaps yo
353353
As another example, we saw in [Character Sets](#CharacterSets) the default characters for CharSet 16 are **0123456789abcdef**. Suppose you like uppercase hexadecimal letters instead.
354354

355355
```js
356-
import {Random} from './entropy-string'
356+
import {Random} from 'entropy-string'
357357

358358
let random = new Random('0123456789ABCDEF')
359359
let string = random.string(48)
@@ -371,7 +371,7 @@ The `Random` constructor allows for 3 separate cases:
371371
The 3rd option above will throw an `Error` if the characters string isn't appropriate.
372372

373373
```js
374-
import {Random} from './entropy-string'
374+
import {Random} from 'entropy-string'
375375

376376
try {
377377
let random = new Random('123456')
@@ -419,7 +419,7 @@ There are two significant issues with this code. `Math.random` returns a random
419419
Compare that to the `entropy-string` scheme. For the example above, slicing off 5 bits at a time requires a total of 80 bits (10 bytes). Creating the same strings as above, `entropy-string` uses 80 bits of randomness per string with no wasted bits. In general, the `entropy-string` scheme can waste up to 7 bits per string, but that's the worst case scenario and that's *per string*, not *per character*!
420420

421421
```js
422-
import {Random} from './entropy-string'
422+
import {Random} from 'entropy-string'
423423

424424
let random = new Random()
425425
let string = random.string(80)
@@ -493,7 +493,7 @@ Note how the number of bytes needed is dependent on the number of characters in
493493

494494
##### In a *million* strings, a *1 in a billion* chance of a repeat (using 32 possible characters):
495495
```js
496-
import {Random, Entropy} from './entropy-string'
496+
import {Random, Entropy} from 'entropy-string'
497497

498498
let bits = Entropy.bitsWithPowers(6,9)
499499
let random = new Random()

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"require": "babel-core/register"
5555
},
5656
"devDependencies": {
57-
"ava": "^0.20.0",
57+
"ava": "^0.21.0",
5858
"babel-cli": "^6.4.0",
5959
"babel-core": "^6.4.0",
6060
"babel-plugin-transform-runtime": "^6.4.3",

0 commit comments

Comments
 (0)