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 • 486 B
JavaScript
import { Controller } from "./controller.js";
import { flattenTemplateTransforms } from "./utilities.js";
export function transform(transforms, options = {}) {
if (!Array.isArray(transforms) && typeof transforms === "object" && transforms !== null && transforms.hasOwnProperty("actions"))
transforms = flattenTemplateTransforms(transforms.actions);
const controller = new Controller(options);
controller.transform(transforms);
}
//# sourceMappingURL=transform.js.map