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.

9 lines 307 B
export function trunc(obj, max = 300) { if (obj) { const text = JSON.stringify(obj); if (typeof text === "string") return text.length <= max ? text : `${text[0]}${text.slice(1, max)}${text[text.length - 1]}`; } return "(empty)"; } //# sourceMappingURL=trunc.js.map