Skip to content

Commit 3954864

Browse files
author
Chris Cavalea
committed
cleanup
1 parent 4c41226 commit 3954864

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const engine = () => 0
4545
bool(engine) // false
4646
```
4747

48-
Additionally, every function in aimless has a counterpart named `withEngine`. This function will return its counterpart with a closure around your engine, so you don't need to pass it every time.
48+
Additionally, every function in Aimless has a counterpart named `withEngine`. This function will return its counterpart with a closure around your engine, so you don't need to pass it every time.
4949

5050
```es6
5151
import { boolWithEngine } from 'aimless.js'

src/utils.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ const defaultEngine = () => {
22
try {
33
// Credit @ Tamás Sallai
44
const crypto = window.crypto || window.msCrypto
5-
const buffer = new ArrayBuffer(8);
6-
const ints = new Int8Array(buffer);
7-
crypto.getRandomValues(ints);
5+
const buffer = new ArrayBuffer(8)
6+
const ints = new Int8Array(buffer)
7+
crypto.getRandomValues(ints)
88

9-
ints[7] = 63;
10-
ints[6] |= 0xf0;
9+
ints[7] = 63
10+
ints[6] |= 0xf0
1111

12-
return new DataView(buffer).getFloat64(0, true) - 1;
12+
return new DataView(buffer).getFloat64(0, true) - 1
1313
} catch (e) {
1414
return Math.random()
1515
}

0 commit comments

Comments
 (0)