Comparing version 2.1.7 to 2.1.8
{ | ||
"name": "mafmt", | ||
"version": "2.1.7", | ||
"version": "2.1.8", | ||
"description": "A multiaddr validator", | ||
@@ -36,3 +36,3 @@ "main": "src/index.js", | ||
"devDependencies": { | ||
"aegir": "^11.0.0", | ||
"aegir": "^11.0.1", | ||
"chai": "^3.5.0", | ||
@@ -42,3 +42,3 @@ "pre-commit": "^1.2.2" | ||
"dependencies": { | ||
"multiaddr": "^2.2.2" | ||
"multiaddr": "^2.2.3" | ||
}, | ||
@@ -45,0 +45,0 @@ "contributors": [ |
@@ -59,7 +59,32 @@ 'use strict' | ||
const IPFS = or( | ||
let _IPFS = or( | ||
and(Reliable, base('ipfs')), | ||
WebRTCStar | ||
WebRTCStar, | ||
base('ipfs') | ||
) | ||
const _Circuit = or( | ||
and(_IPFS, base('p2p-circuit'), _IPFS), | ||
and(_IPFS, base('p2p-circuit')), | ||
and(base('p2p-circuit'), _IPFS), | ||
and(Reliable, base('p2p-circuit')), | ||
and(base('p2p-circuit'), Reliable), | ||
base('p2p-circuit') | ||
) | ||
const CircuitRecursive = () => or( | ||
and(_Circuit, CircuitRecursive), | ||
_Circuit | ||
) | ||
const Circuit = CircuitRecursive() | ||
const IPFS = or( | ||
and(Circuit, _IPFS, Circuit), | ||
and(_IPFS, Circuit), | ||
and(Circuit, _IPFS), | ||
Circuit, | ||
_IPFS | ||
) | ||
exports.DNS = DNS | ||
@@ -78,2 +103,3 @@ exports.DNS4 = DNS4 | ||
exports.Reliable = Reliable | ||
exports.Circuit = Circuit | ||
exports.IPFS = IPFS | ||
@@ -104,3 +130,3 @@ | ||
args.some(function (arg) { | ||
a = arg.partialMatch(a) | ||
a = typeof arg === 'function' ? arg().partialMatch(a) : arg.partialMatch(a) | ||
if (a === null) { | ||
@@ -138,3 +164,3 @@ return true | ||
args.some(function (arg) { | ||
const res = arg.partialMatch(a) | ||
const res = typeof arg === 'function' ? arg().partialMatch(a) : arg.partialMatch(a) | ||
if (res) { | ||
@@ -161,2 +187,3 @@ out = res | ||
const name = n | ||
function matches (a) { | ||
@@ -163,0 +190,0 @@ if (typeof a === 'string') { |
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
625995
8256
Updatedmultiaddr@^2.2.3