tfk-dsf-normalize-contact
Advanced tools
Comparing version 3.1.0 to 3.1.1
@@ -25,8 +25,9 @@ 'use strict' | ||
contact.alive = dsf.STAT ? (dsf.STAT !== 'DØD') : '' | ||
contact.motherIdNumber = dsf['MOR-FODT'] ? (dsf['MOR-FODT'].toString() + dsf['MOR-PERS'].toString()) : '' | ||
contact.fatherIdNumber = dsf['FAR-FODT'] ? (dsf['FAR-FODT'].toString() + dsf['FAR-PERS'].toString()) : '' | ||
contact.spouseIdNumber = dsf['EKT-FODT'] ? (dsf['EKT-FODT'].toString() + dsf['EKT-PERS'].toString()) : '' | ||
contact.motherIdNumber = dsf['MOR-FODT'] && dsf['MOR-PERS'] ? (dsf['MOR-FODT'].toString() + dsf['MOR-PERS'].toString()) : '' | ||
contact.fatherIdNumber = dsf['FAR-FODT'] && dsf['FAR-PERS'] ? (dsf['FAR-FODT'].toString() + dsf['FAR-PERS'].toString()) : '' | ||
contact.spouseIdNumber = dsf['EKT-FODT'] && dsf['EKT-PERS'] ? (dsf['EKT-FODT'].toString() + dsf['EKT-PERS'].toString()) : '' | ||
contact.children = [] | ||
if (dsf['Barn']) { | ||
contact.children = Array.isArray(dsf['Barn']) ? dsf['Barn'] : [dsf['Barn']] | ||
contact.children = contact.children.filter(child => child['BAR-FODT'] && child['BAR-PERS']) | ||
contact.children = contact.children.map(child => ( | ||
@@ -33,0 +34,0 @@ { |
{ | ||
"name": "tfk-dsf-normalize-contact", | ||
"description": "Transforms contact information from dsf to something useful", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"author": { | ||
@@ -47,4 +47,4 @@ "name": "Jonas Enge", | ||
"devDependencies": { | ||
"coveralls": "3.0.3", | ||
"tap": "12.6.1", | ||
"coveralls": "3.0.4", | ||
"tap": "14.2.3", | ||
"standard": "12.0.1" | ||
@@ -51,0 +51,0 @@ }, |
@@ -10,5 +10,4 @@ { | ||
"maccyber", | ||
"Sherex", | ||
"zrrrzzt" | ||
"Sherex" | ||
] | ||
} |
11216