UNPKG

syphonx-core

Version:

SyphonX is a template-driven solution for extracting data from HTML in a highly efficient way. It combines the power of jQuery, Regular Expressions, and Javascript into a declarative template-driven format that extracts and reshapes HTML data into JSON.

14 lines 480 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.trunc = void 0; function trunc(obj, max) { if (max === void 0) { max = 300; } if (obj) { var text = JSON.stringify(obj); if (typeof text === "string") return text.length <= max ? text : "".concat(text[0]).concat(text.slice(1, max), "\u2026").concat(text[text.length - 1]); } return "(empty)"; } exports.trunc = trunc; //# sourceMappingURL=trunc.js.map