Skip to content
This repository was archived by the owner on Feb 24, 2021. It is now read-only.

Commit 4cbcf38

Browse files
committed
fix: lint
1 parent 59a08c5 commit 4cbcf38

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

src/handshake/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const finish = require('./finish')
77
// Performs initial communication over insecure channel to share keys, IDs,
88
// and initiate communication, assigning all necessary params.
99
module.exports = function handshake (state) {
10-
const {awaitConnected} = state
10+
const { awaitConnected } = state
1111

1212
const main = async () => {
1313
await propose(state)

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module.exports = {
2020
const timeout = 60 * 1000 * 5
2121
const state = new State(localId, remoteId, timeout)
2222

23-
const {handler, awaitConnected} = handshake(state)
23+
const { handler, awaitConnected } = handshake(state)
2424

2525
const encryptedConnection = new Connection(undefined, conn)
2626
encryptedConnection.awaitConnected = (async () => { // NOTE: all errors this throws should ideally be also sent down the wire of the connection

src/state.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const defer = (timeout) => {
1717
d()
1818
}
1919

20-
let prom = new Promise((resolve, reject) => {
20+
const prom = new Promise((resolve, reject) => {
2121
_resolve = resolve
2222
_reject = reject
2323
})

src/support.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ exports.theBest = (order, p1, p2) => {
3838
return p1[0]
3939
}
4040

41-
for (let firstCandidate of first) {
42-
for (let secondCandidate of second) {
41+
for (const firstCandidate of first) {
42+
for (const secondCandidate of second) {
4343
if (firstCandidate === secondCandidate) {
4444
return firstCandidate
4545
}

test/secio.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ describe('secio', () => {
144144
const p = pair()
145145

146146
// we are using peerC Id on purpose to fail
147-
const {awaitConnected: prom1} = secio.encrypt(peerA, new Connection(p[0]), peerC)
148-
const {awaitConnected: prom2} = secio.encrypt(peerB, new Connection(p[1]), peerA)
147+
const { awaitConnected: prom1 } = secio.encrypt(peerA, new Connection(p[0]), peerC)
148+
const { awaitConnected: prom2 } = secio.encrypt(peerB, new Connection(p[1]), peerA)
149149

150150
const errs = await Promise.all([prom1, prom2].map(catcher))
151151
expect(errs.filter(Boolean).length).to.equal(2)

0 commit comments

Comments
 (0)