fracturedjsonjs
Version:
JSON formatter that produces highly readable but fairly compact output
27 lines (26 loc) • 1.07 kB
TypeScript
/**
* Options for how lists or columns of numbers should be aligned, and whether the precision may be changed
* to be consistent.
*/
export declare enum NumberListAlignment {
/**
* Left-aligns numbers, keeping each exactly as it appears in the input document.
*/
Left = 0,
/**
* Right-aligns numbers, keeping each exactly as it appears in the input document.
*/
Right = 1,
/**
* Arranges the numbers so that the decimal points line up, but keeps each value exactly as it appears in the
* input document. Numbers expressed in scientific notation are aligned according to the significand's decimal
* point, if any, or the "e".
*/
Decimal = 2,
/**
* Tries to rewrite all numbers in the list in regular, non-scientific notation, all with the same number of digits
* after the decimal point, all lined up. If any of the numbers have too many digits or can't be written without
* scientific notation, left-alignment is used as a fallback.
*/
Normalize = 3
}