Socket
Socket
Sign inDemoInstall

@ltht-react/utils

Package Overview
Dependencies
Maintainers
1
Versions
319
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ltht-react/utils - npm Package Compare versions

Comparing version 0.0.10 to 0.0.11

8

CHANGELOG.md

@@ -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

lib/atoms/codeable-concept.js

@@ -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 @@ };

14

lib/atoms/codeable-concept.test.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc