Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getJSON() {
return {
service: util.trimFQDN(this.service),
protocol: util.trimFQDN(this.protocol),
priority: this.priority,
weight: this.weight,
target: this.target.toJSON(),
port: this.port
};
}
toString() {
const nid = util.trimFQDN(this.nid);
return `magnet:?xt=urn:${nid.toLowerCase()}:${this.nin}`;
}
getJSON() {
const protocol = util.trimFQDN(this.protocol);
return {
protocol: protocol.toLowerCase(),
port: this.port,
usage: this.usage,
selector: this.selector,
matchingType: this.matchingType,
certificate: this.certificate.toString('hex')
};
}
getJSON() {
return {
service: util.trimFQDN(this.service),
protocol: util.trimFQDN(this.protocol),
priority: this.priority,
weight: this.weight,
target: this.target.toJSON(),
port: this.port
};
}
toString() {
const currency = util.trimFQDN(this.currency);
return `${currency.toLowerCase()}:${this.address}`;
}