dolphindb 3.1.20 → 3.1.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1557,13 +1557,12 @@ export class DdbObj {
1557
1557
  }
1558
1558
  }
1559
1559
  const grey_nullstr = 'null'.grey;
1560
- const nullstr = 'null';
1561
1560
  function format_time(type, value, options) {
1562
1561
  if (value === null ||
1563
1562
  value === ((type === DdbType.timestamp ||
1564
1563
  type === DdbType.nanotime ||
1565
1564
  type === DdbType.nanotimestamp) ? nulls.int64 : nulls.int32))
1566
- return options.colors ? grey_nullstr : nullstr;
1565
+ return options.colors ? grey_nullstr : 'null';
1567
1566
  let str;
1568
1567
  // formatter 可能会在 value 不属于 new Date() 有效值时,调用 抛出错误,这里统一处理
1569
1568
  try {
@@ -1582,7 +1581,7 @@ function format_time(type, value, options) {
1582
1581
  }
1583
1582
  function format_number(type, value, options) {
1584
1583
  return value === null || value === number_nulls.get(type) ?
1585
- options.colors ? grey_nullstr : nullstr
1584
+ options.colors ? grey_nullstr : 'null'
1586
1585
  : colored(get_number_formatter(type === DdbType.int || type === DdbType.long || type === DdbType.short, options.decimals, options.grouping).format(value), 'green', options.colors);
1587
1586
  }
1588
1587
  /** 根据 DdbType 格式化单个元素 (value) 为字符串,空值返回 'null' 字符串 */