dolphindb 2.0.1035 → 2.0.1100
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/browser.js +2 -2
- package/browser.js.map +1 -1
- package/index.js +2 -2
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/shared/utils.d.ts +4 -0
- package/shared/utils.js +17 -0
- package/shared/utils.js.map +1 -0
package/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import { concat, assert, inspect, typed_array_to_buffer, connect_websocket, Lock
|
|
|
8
8
|
import { t } from './i18n/index.js';
|
|
9
9
|
import { DdbDecimal128Serializor } from './data-types/decimal-128.js';
|
|
10
10
|
import { BigInt128Array } from './shared/bigint-128-array.js';
|
|
11
|
-
import { is_decimal_type, is_decimal_null_value } from './shared/utils
|
|
11
|
+
import { is_decimal_type, is_decimal_null_value, get_duration_unit } from './shared/utils.js';
|
|
12
12
|
import { nulls, DdbChartType, DdbDurationUnit, DdbForm, DdbFunctionType, DdbType } from './shared/constants.js';
|
|
13
13
|
export * from './shared/constants.js';
|
|
14
14
|
// Simulate other TypedArray behavior in nodejs
|
|
@@ -1466,7 +1466,7 @@ export function format(type, value, le, options = {}) {
|
|
|
1466
1466
|
}
|
|
1467
1467
|
case DdbType.duration: {
|
|
1468
1468
|
const { data, unit } = value;
|
|
1469
|
-
const str = `${data}${DdbDurationUnit[unit]}`;
|
|
1469
|
+
const str = `${data}${DdbDurationUnit[unit] ?? get_duration_unit(unit)}`;
|
|
1470
1470
|
return options.colors ? str.magenta : str;
|
|
1471
1471
|
}
|
|
1472
1472
|
case DdbType.decimal32:
|