@universe/models
Advanced tools
Comparing version 0.7.0 to 0.7.1
@@ -84,2 +84,3 @@ "use strict"; | ||
static residentialAddress(person) { | ||
var _a, _b; | ||
if (!person) { | ||
@@ -91,10 +92,15 @@ return null; | ||
} | ||
let preferred = null; | ||
for (const addr of person.addresses) { | ||
if (addr.type !== "INV" /* INV */ && addr.type !== "MAIL" /* MAIL */) { | ||
return addr.address || null; | ||
// Give preference to more "complete" addresses. TODO: Make more intelligent. | ||
if (!preferred || (!((_a = preferred.address) === null || _a === void 0 ? void 0 : _a.zip) && ((_b = addr.address) === null || _b === void 0 ? void 0 : _b.zip))) { | ||
preferred = addr || null; | ||
} | ||
} | ||
} | ||
return null; | ||
return (preferred === null || preferred === void 0 ? void 0 : preferred.address) || null; | ||
} | ||
static mailAddress(person) { | ||
var _a, _b; | ||
if (!person) { | ||
@@ -106,8 +112,12 @@ return null; | ||
} | ||
let preferred = null; | ||
for (const addr of person.addresses) { | ||
if (addr.type === "MAIL" /* MAIL */) { | ||
return addr.address || null; | ||
// Give preference to more "complete" addresses. TODO: Make more intelligent. | ||
if (!preferred || (!((_a = preferred.address) === null || _a === void 0 ? void 0 : _a.zip) && ((_b = addr.address) === null || _b === void 0 ? void 0 : _b.zip))) { | ||
preferred = addr || null; | ||
} | ||
} | ||
} | ||
return Person.residentialAddress(person); | ||
return (preferred === null || preferred === void 0 ? void 0 : preferred.address) || Person.residentialAddress(person); | ||
} | ||
@@ -265,2 +275,2 @@ static age(person) { | ||
exports.ensurePerson = ensurePerson; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUGVyc29uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL21vZGVscy9QZXJzb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEseUNBTXdCO0FBRXhCLG9DQXFCa0I7QUFFbEIseUNBQTRDO0FBUTVDLE1BQWEsTUFBTyxTQU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gJ29iamVjdCcpIHtcbiAgICByZXR1cm4gZmFsc2U7XG4gIH1cblxuICBsZXQgcmV0ID0gdHJ1ZTtcbiAgY29uc3QgcGVyc29uOiBQYXJ0aWFsPElQZXJzb24+ID0gbyBhcyBQYXJ0aWFsPElQZXJzb24+O1xuICBmb3IgKGNvbnN0IGtleSBvZiBPYmplY3Qua2V5cyhkZWZhdWx0UGVyc29uKSkge1xuICAgIGlmICghcGVyc29uVmFsaWRhdG9yW2tleV0ocGVyc29uW2tleV0pKSB7XG4gICAgICBsb2cgJiYgbG9nKGBVbnNhbml0YXJ5IERhdGEgZm9yIHBlcnNvbiBcIiR7cGVyc29uLmlkfVwiLiBJbnZhbGlkIHZhbHVlIGZvciAke2tleX06ICR7SlNPTi5zdHJpbmdpZnkocGVyc29uW2tleV0sIG51bGwsIDIpfWApO1xuICAgICAgcmV0ID0gZmFsc2U7XG4gICAgfVxuICB9XG4gIHJldHVybiByZXQ7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBlbnN1cmVQZXJzb24obzogUGFydGlhbDxJUGVyc29uPik6IFBlcnNvbiB7XG4gIGlmIChvIGluc3RhbmNlb2YgUGVyc29uKSB7IHJldHVybiBvOyB9XG4gIGZvciAoY29uc3Qga2V5IG9mIE9iamVjdC5rZXlzKG8pKSB7XG4gICAgaWYgKCFpc1BlcnNvblByb3Aoa2V5KSkgeyBkZWxldGUgb1trZXldOyB9XG4gIH1cbiAgZm9yIChjb25zdCBrZXkgb2YgcGVyc29uUHJvcHMpIHtcbiAgICBpZiAoIXBlcnNvblZhbGlkYXRvcltrZXldPy4ob1trZXldKSkgeyAob1trZXldIGFzIHVua25vd24pID0gZGVmYXVsdFBlcnNvbltrZXldOyB9XG4gIH1cbiAgcmV0dXJuIG5ldyBQZXJzb24obyBhcyBJUGVyc29uKTtcbn1cblxuZXhwb3J0IHsgSVBlcnNvbiB9O1xuIl19 |
{ | ||
"name": "@universe/models", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"main": "dist/src/index.js", | ||
@@ -5,0 +5,0 @@ "description": "Universe data models.", |
1702253
13270