acebase/dist/esm/node-address.js
Ewout Stortenbeker 8b884eb7c0 chore: build
2022-10-31 22:53:29 +01:00

29 lines
No EOL
667 B
JavaScript

export class NodeAddress {
constructor(path) {
this.path = path;
}
toString() {
return `"/${this.path}"`;
}
/**
* Compares this address to another address
*/
equals(address) {
return this.path === address.path;
}
}
export class RemovedNodeAddress extends NodeAddress {
constructor(path) {
super(path);
}
toString() {
return `"/${this.path}" (removed)`;
}
/**
* Compares this address to another address
*/
equals(address) {
return address instanceof RemovedNodeAddress && this.path === address.path;
}
}
//# sourceMappingURL=node-address.js.map