New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@universe/models

Package Overview
Dependencies
Maintainers
3
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@universe/models - npm Package Compare versions

Comparing version

to
1.0.1

44

dist/src/models/Person.js

@@ -7,2 +7,28 @@ "use strict";

const Language_1 = require("./Language");
// Given two address, return the more "complete" object.
// TODO: Make more intelligent.
function preferredAddress(addr1, addr2) {
if (!addr1 || !addr2) {
return addr1 || addr2;
}
if (addr1.unitNum && !addr2.unitNum) {
return addr1;
}
if (addr2.unitNum && !addr1.unitNum) {
return addr2;
}
if (addr1.number && !addr2.number) {
return addr1;
}
if (addr2.number && !addr1.number) {
return addr2;
}
if (addr1.zip && !addr2.zip) {
return addr1;
}
if (addr2.zip && !addr1.zip) {
return addr2;
}
return addr1;
}
class Person extends types_1.Person {

@@ -85,3 +111,2 @@ static getAccountId(acctType, person) {

static residentialAddress(person) {
var _a, _b;
if (!person) {

@@ -96,12 +121,8 @@ return null;

if (addr.type !== "INV" /* INV */ && addr.type !== "MAIL" /* MAIL */) {
// 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;
}
preferred = preferredAddress(preferred, addr.address || null);
}
}
return (preferred === null || preferred === void 0 ? void 0 : preferred.address) || null;
return preferred;
}
static mailAddress(person) {
var _a, _b;
if (!person) {

@@ -116,9 +137,6 @@ return null;

if (addr.type === "MAIL" /* MAIL */) {
// 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;
}
preferred = preferredAddress(preferred, addr.address || null);
}
}
return (preferred === null || preferred === void 0 ? void 0 : preferred.address) || Person.residentialAddress(person);
return preferred || Person.residentialAddress(person);
}

@@ -276,2 +294,2 @@ static age(person) {

exports.ensurePerson = ensurePerson;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUGVyc29uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL21vZGVscy9QZXJzb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEseUNBTXdCO0FBRXhCLG9DQXFCa0I7QUFFbEIseUNBQTRDO0FBUTVDLE1BQWEsTUFBTyxTQUFRLGNBQWM7SUFDeEMsTUFBTSxDQUFDLFlBQVksQ0FBQyxRQUFxQixFQUFFLE1BQWU7UUFDeEQsSUFBSSxDQUFDLE1BQU0sQ0FBQyxRQUFRLEVBQUU7WUFBRSxPQUFPLElBQUksQ0FBQztTQUFFO1FBQ3RDLEtBQUssTUFBTSxJQUFJLElBQUksTUFBTSxDQUFDLFFBQVEsRUFBRTtZQUNsQyxJQUFJLElBQUksQ0FBQyxXQUFXLEtBQUssUUFBUSxFQUFFO2dCQUFFLE9BQU8sSUFBZ0IsQ0FBQzthQUFFO1NBQ2hFO1FBQ0QsT0FBTyxJQUFJLENBQUM7SUFDZCxDQUFDO0lBRUQsTUFBTSxDQUFDLGNBQWMsQ0FBQyxNQUFnQzs7UUFDcEQsSUFBSSxDQUFDLE1BQU0sRUFBRTtZQUFFLE9BQU8sSUFBSSxDQUFDO1NBQUU7UUFDN0IsSUFBSSxDQUFDLE1BQU0sQ0FBQyxNQUFNLElBQUksTUFBTSxDQUFDLE1BQU0sQ0FBQyxNQUFNLEtBQUssQ0FBQyxFQUFFO1lBQUUsT0FBTyxJQUFJLENBQUM7U0FBRTtRQUVsRSxJQUFJLElBQUksR0FBa0IsSUFBSSxDQUFDO1FBQy9CLElBQUksSUFBSSxHQUFrQixJQUFJLENBQUM7UUFDL0IsSUFBSSxJQUFJLEdBQWtCLElBQ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qcm9wcykge1xuICAgIGlmICghcGVyc29uVmFsaWRhdG9yW2tleV0/LihvW2tleV0pKSB7IChvW2tleV0gYXMgdW5rbm93bikgPSBkZWZhdWx0UGVyc29uW2tleV07IH1cbiAgfVxuICByZXR1cm4gbmV3IFBlcnNvbihvIGFzIElQZXJzb24pO1xufVxuXG5leHBvcnQgeyBJUGVyc29uIH07XG4iXX0=
{
"name": "@universe/models",
"version": "1.0.0",
"version": "1.0.1",
"main": "dist/src/index.js",

@@ -5,0 +5,0 @@ "description": "Universe data models.",