Comparing version 2.1.8 to 3.0.0
{ | ||
"name": "mafmt", | ||
"version": "2.1.8", | ||
"version": "3.0.0", | ||
"description": "A multiaddr validator", | ||
@@ -36,8 +36,8 @@ "main": "src/index.js", | ||
"devDependencies": { | ||
"aegir": "^11.0.1", | ||
"chai": "^3.5.0", | ||
"aegir": "^11.0.2", | ||
"chai": "^4.1.2", | ||
"pre-commit": "^1.2.2" | ||
}, | ||
"dependencies": { | ||
"multiaddr": "^2.2.3" | ||
"multiaddr": "^3.0.0" | ||
}, | ||
@@ -44,0 +44,0 @@ "contributors": [ |
@@ -43,8 +43,14 @@ 'use strict' | ||
const WebRTCStar = or( | ||
and(base('libp2p-webrtc-star'), WebSockets, base('ipfs')), | ||
and(base('libp2p-webrtc-star'), WebSocketsSecure, base('ipfs')) | ||
and(WebSockets, base('p2p-webrtc-star'), base('ipfs')), | ||
and(WebSocketsSecure, base('p2p-webrtc-star'), base('ipfs')) | ||
) | ||
const WebRTCDirect = and(base('libp2p-webrtc-direct'), HTTP) | ||
const WebSocketsStar = or( | ||
and(WebSockets, base('p2p-websockets-star')), | ||
and(WebSockets, base('p2p-websockets-star'), base('ipfs')), | ||
and(WebSocketsSecure, base('p2p-websockets-star'), base('ipfs')) | ||
) | ||
const WebRTCDirect = and(HTTP, base('p2p-webrtc-direct')) | ||
const Reliable = or( | ||
@@ -100,2 +106,3 @@ WebSockets, | ||
exports.WebSocketsSecure = WebSocketsSecure | ||
exports.WebSocketsStar = WebSocketsStar | ||
exports.WebRTCStar = WebRTCStar | ||
@@ -129,4 +136,7 @@ exports.WebRTCDirect = WebRTCDirect | ||
} | ||
args.some(function (arg) { | ||
a = typeof arg === 'function' ? arg().partialMatch(a) : arg.partialMatch(a) | ||
args.some((arg) => { | ||
a = typeof arg === 'function' | ||
? arg().partialMatch(a) | ||
: arg.partialMatch(a) | ||
if (a === null) { | ||
@@ -163,4 +173,6 @@ return true | ||
let out = null | ||
args.some(function (arg) { | ||
const res = typeof arg === 'function' ? arg().partialMatch(a) : arg.partialMatch(a) | ||
args.some((arg) => { | ||
const res = typeof arg === 'function' | ||
? arg().partialMatch(a) | ||
: arg.partialMatch(a) | ||
if (res) { | ||
@@ -167,0 +179,0 @@ out = res |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
632291
8335
+ Addedmultiaddr@3.1.0(transitive)
- Removedmultiaddr@2.3.0(transitive)
Updatedmultiaddr@^3.0.0