"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); class ContactAddress { static fromPrefixedString(prefixed) { const components = prefixed.split(/:/); const type = components.shift(); if (type == null) { throw new Error('Invalid input: ' + prefixed); } const unprefixed = components.join(':'); return new ContactAddress(type, unprefixed); } constructor(type, address) { this.type = type; this.address = address; } matches(search) { if (this.address.toLowerCase().trim().indexOf(search.toLowerCase().trim()) >= 0) { return true; } return false; } matchesExactly(addressType, addressValue) { return (this.type === addressType) && (this.address.toLowerCase().trim() === addressValue.toLowerCase().trim()); } toPrefixedString() { return `${this.type}:${this.address}`; } } exports.ContactAddress = ContactAddress; //# sourceMappingURL=contact-address.js.map