@ltht-react/utils
Advanced tools
Comparing version 0.0.10 to 0.0.11
@@ -6,2 +6,10 @@ # Change Log | ||
## [0.0.11](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/utils@0.0.10...@ltht-react/utils@0.0.11) (2020-02-10) | ||
**Note:** Version bump only for package @ltht-react/utils | ||
## [0.0.10](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/utils@0.0.9...@ltht-react/utils@0.0.10) (2020-01-30) | ||
@@ -8,0 +16,0 @@ |
@@ -5,3 +5,3 @@ "use strict"; | ||
if (codeableConcept === void 0) { codeableConcept = {}; } | ||
var _a; | ||
var _a, _b, _c, _d; | ||
var codings = ((_a = codeableConcept) === null || _a === void 0 ? void 0 : _a.coding) || []; | ||
@@ -14,2 +14,5 @@ var display = codings | ||
.join(', '); | ||
if (((_b = display) === null || _b === void 0 ? void 0 : _b.length) === 0) { | ||
display = (_d = (_c = codeableConcept) === null || _c === void 0 ? void 0 : _c.text, (_d !== null && _d !== void 0 ? _d : '')); | ||
} | ||
return display; | ||
@@ -16,0 +19,0 @@ }; |
@@ -6,6 +6,18 @@ "use strict"; | ||
describe('codeableConceptDisplaySummary', function () { | ||
it('empty coding display formats correctly', function () { | ||
it('null coding display formats correctly', function () { | ||
var codeable = {}; | ||
expect(codeable_concept_1.codeableConceptDisplaySummary(codeable)).toEqual(''); | ||
}); | ||
it('null coding, populated text display formats correctly', function () { | ||
var codeable = { text: 'Test Text 1' }; | ||
expect(codeable_concept_1.codeableConceptDisplaySummary(codeable)).toEqual('Test Text 1'); | ||
}); | ||
it('empty coding, populated text display formats correctly', function () { | ||
var codeable = { coding: [], text: 'Test Text 2' }; | ||
expect(codeable_concept_1.codeableConceptDisplaySummary(codeable)).toEqual('Test Text 2'); | ||
}); | ||
it('signle coding with empty display, populated text display formats correctly', function () { | ||
var codeable = { coding: [{ display: '' }], text: 'Test Text 2' }; | ||
expect(codeable_concept_1.codeableConceptDisplaySummary(codeable)).toEqual('Test Text 2'); | ||
}); | ||
it('single coding display formats correctly', function () { | ||
@@ -12,0 +24,0 @@ var codeable = { |
{ | ||
"name": "@ltht-react/utils", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"description": "> TODO: description", | ||
@@ -27,3 +27,3 @@ "author": "Jonny Smith <jonny.asmith@gmail.com>", | ||
}, | ||
"gitHead": "41a42ce817ac46f80fe142d3af2e0e4af689adf3" | ||
"gitHead": "509c83bfa121653141e3c141688d4062613cae4c" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
41611
513
0