UNPKG

nodejs-polars

Version:

Polars: Blazingly fast DataFrames in Rust, Python, Node.js, R and SQL

53 lines (52 loc) 1.78 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Config = void 0; const polars_internal_1 = __importDefault(require("./internals/polars_internal")); exports.Config = { setAsciiTables(active) { polars_internal_1.default.setAsciiTables(active); return this; }, setTblWidthChars(width) { polars_internal_1.default.setTblWidthChars(width); return this; }, setTblRows(n) { polars_internal_1.default.setTblRows(n); return this; }, setTblCols(n) { polars_internal_1.default.setTblCols(n); return this; }, setTblColumnDataTypeInline(active) { polars_internal_1.default.setTblColumnDataTypeInline(active ? 1 : 0); return this; }, setTblHideColumnDataTypes(active) { polars_internal_1.default.setTblHideColumnDataTypes(active ? 1 : 0); return this; }, setVerbose(active) { polars_internal_1.default.setVerbose(active ? 1 : 0); return this; }, setThousandsSeparator(separator) { if (typeof separator === "boolean" && separator) { polars_internal_1.default.setDecimalSeparator("."); polars_internal_1.default.setThousandsSeparator(","); } else if (typeof separator === "string") { if (separator.length > 1) throw new TypeError("separator must be a single character;"); polars_internal_1.default.setThousandsSeparator(separator); } else { polars_internal_1.default.setThousandsSeparator(); } return this; }, };