Skip to content
This repository has been archived by the owner on Aug 23, 2019. It is now read-only.

Commit

Permalink
Merge pull request #106 from libp2p/fix-includes
Browse files Browse the repository at this point in the history
refactor(transport): replace _.contains with _.includes
  • Loading branch information
daviddias authored Sep 23, 2016
2 parents 823d82c + e70d210 commit 75d585d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"interface-connection": "^0.2.1",
"ip-address": "^5.8.2",
"libp2p-identify": "^0.2.0",
"lodash.contains": "^2.4.3",
"lodash.includes": "^4.3.0",
"multiaddr": "^2.0.2",
"multistream-select": "^0.11.0",
"peer-id": "^0.7.0",
Expand All @@ -76,4 +76,4 @@
"Pau Ramon Revilla <masylum@gmail.com>",
"Richard Littauer <richard.littauer@gmail.com>"
]
}
}
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const util = require('util')
const EE = require('events').EventEmitter
const parallel = require('run-parallel')
const contains = require('lodash.contains')
const includes = require('lodash.includes')

const transport = require('./transport')
const connection = require('./connection')
Expand Down Expand Up @@ -69,7 +69,7 @@ function Swarm (peerInfo) {
return addr
}

if (contains(addr.protoNames(), 'ipfs')) {
if (includes(addr.protoNames(), 'ipfs')) {
return addr.decapsulate('ipfs')
}
return addr
Expand Down

0 comments on commit 75d585d

Please sign in to comment.