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

fix: reduce bundle size #66

Merged
merged 2 commits into from
Jan 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .jshintrc

This file was deleted.

27 changes: 13 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,25 @@
"dependencies": {
"async": "^2.6.1",
"class-is": "^1.1.0",
"data-queue": "0.0.3",
"debug": "^4.1.1",
"interface-connection": "~0.3.3",
"libp2p-crypto": "~0.15.0",
"mafmt": "^6.0.3",
"merge-recursive": "0.0.3",
"multiaddr": "^6.0.2",
"interface-connection": "~0.3.2",
"libp2p-crypto": "~0.16.0",
"mafmt": "^6.0.4",
"multiaddr": "^6.0.3",
"nanoid": "^2.0.0",
"once": "^1.4.0",
"peer-id": "~0.12.1",
"peer-info": "~0.15.0",
"peer-id": "~0.12.2",
"peer-info": "~0.15.1",
"pull-stream": "^3.6.9",
"socket.io-client": "^2.1.1",
"socket.io-pull-stream": "~0.1.5",
"uuid": "^3.3.2"
},
"directories": {
"test": "test"
"socket.io-pull-stream": "~0.1.5"
},
"files": [
"src",
"dist"
],
"devDependencies": {
"aegir": "^18.0.2",
"aegir": "^18.0.3",
"chai": "^4.2.0",
"dirty-chai": "^2.0.1",
"libp2p-websocket-star-rendezvous": "~0.2.4",
Expand Down
5 changes: 3 additions & 2 deletions src/listener.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ const setImmediate = require('async/setImmediate')
const utils = require('./utils')
const cleanUrlSIO = utils.cleanUrlSIO
const crypto = require('libp2p-crypto')
const pull = require('pull-stream')
const pull = require('pull-stream/pull')
const through = require('pull-stream/throughs/through')
const ERRORS = require('./errors')

const noop = once(() => {})
Expand Down Expand Up @@ -296,7 +297,7 @@ class Listener extends EE {

stateWatch (sink, source) {
let cstate = { sink: true, source: true }
const watch = (name) => pull.through(v => v, e => {
const watch = (name) => through(v => v, e => {
cstate[name] = false
if (!cstate.sink && !cstate.source) {
this.maybeClose()
Expand Down