|
123456789101112131415161718 |
- //
- // Copyright (C) Stanislaw Adaszewski, 2020
- // Contact: s.adaszewski@gmail.com
- // Website: https://adared.ch/wba
- // License: GNU Affero General Public License, Version 3
- //
-
- import { h } from 'preact';
-
- function wbFormatSpecialValue(value) {
- if (value === null) return (<i>null</i>);
- if (value === undefined) return (<i>undefined</i>);
- if (typeof(value) === 'boolean') return (<i>{ String(value) }</i>);
- if (value === '') return '-';
- return String(value);
- }
-
- export default wbFormatSpecialValue;
|