|
|
@ -90,7 +90,7 @@ URI.isValid = function(arg, knownParams) { |
|
|
|
try { |
|
|
|
var uri = new URI(arg, knownParams); |
|
|
|
return true; |
|
|
|
} catch(err) { |
|
|
|
} catch (err) { |
|
|
|
return false; |
|
|
|
} |
|
|
|
}; |
|
|
@ -165,9 +165,9 @@ URI.prototype._parseAmount = function(amount) { |
|
|
|
|
|
|
|
URI.prototype.toJSON = function() { |
|
|
|
var json = {}; |
|
|
|
for(var i=0;i<URI.Members.length;i++){ |
|
|
|
for (var i = 0; i < URI.Members.length; i++) { |
|
|
|
var m = URI.Members[i]; |
|
|
|
if (this.hasOwnProperty(m) && typeof(this[m]) !== 'undefined'){ |
|
|
|
if (this.hasOwnProperty(m) && typeof(this[m]) !== 'undefined') { |
|
|
|
if (typeof(this[m].toString) === 'function') { |
|
|
|
json[m] = this[m].toString(); |
|
|
|
} else { |
|
|
@ -213,7 +213,7 @@ URI.prototype.toString = function() { |
|
|
|
* @returns {String} Bitcoin URI |
|
|
|
*/ |
|
|
|
URI.prototype.inspect = function() { |
|
|
|
return '<URI: ' + this.toString()+ '>'; |
|
|
|
return '<URI: ' + this.toString() + '>'; |
|
|
|
}; |
|
|
|
|
|
|
|
module.exports = URI; |
|
|
|