From eaf58a9d0651093d9cbaa3c0a45d0746507db205 Mon Sep 17 00:00:00 2001 From: raj Date: Sat, 23 Oct 2021 01:24:33 -0700 Subject: [PATCH 1/2] Adding value converter --- src/value-converters/number-to-string.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/value-converters/number-to-string.ts diff --git a/src/value-converters/number-to-string.ts b/src/value-converters/number-to-string.ts new file mode 100644 index 00000000..95e74077 --- /dev/null +++ b/src/value-converters/number-to-string.ts @@ -0,0 +1,11 @@ +/* +Copyright 2020, Verizon Media +Licensed under the terms of the MIT license. See the LICENSE file in the project root for license terms. +*/ + +export class NumberToStringValueConverter { + public toView(value) { + if (value === null || value === '') return null; + return String(`${value}`); + } +} From 0b2e7a87a57e112315e002c256a0481e8db475c7 Mon Sep 17 00:00:00 2001 From: natrajant Date: Fri, 29 Oct 2021 10:11:25 -0700 Subject: [PATCH 2/2] Update number-to-string.ts --- src/value-converters/number-to-string.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/value-converters/number-to-string.ts b/src/value-converters/number-to-string.ts index 95e74077..78e574a3 100644 --- a/src/value-converters/number-to-string.ts +++ b/src/value-converters/number-to-string.ts @@ -1,8 +1,3 @@ -/* -Copyright 2020, Verizon Media -Licensed under the terms of the MIT license. See the LICENSE file in the project root for license terms. -*/ - export class NumberToStringValueConverter { public toView(value) { if (value === null || value === '') return null;