UNPKG

@papb/json-excel

Version:

Create a pretty Excel table from JSON data with a very simple API

16 lines 717 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.assertDimensionsAcceptable = void 0; function assertDimensionsAcceptable(rows, columns) { // https://support.microsoft.com/en-ie/office/excel-specifications-and-limits-1672b34d-7043-467e-8e27-269d656771c3 const MAX_ROWS = 1048576; const MAX_COLUMNS = 16384; if (rows > MAX_ROWS) { throw new TypeError(`Expected at most ${MAX_ROWS} rows, got ${rows}`); } if (columns > MAX_COLUMNS) { throw new TypeError(`Expected at most ${MAX_COLUMNS} columns, got ${columns}`); } } exports.assertDimensionsAcceptable = assertDimensionsAcceptable; //# sourceMappingURL=assert-dimensions-acceptable.js.map