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 • 682 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.transform = void 0;
var controller_js_1 = require("./controller.js");
var utilities_js_1 = require("./utilities.js");
function transform(transforms, options) {
if (options === void 0) { options = {}; }
if (!Array.isArray(transforms) && typeof transforms === "object" && transforms !== null && transforms.hasOwnProperty("actions"))
transforms = (0, utilities_js_1.flattenTemplateTransforms)(transforms.actions);
var controller = new controller_js_1.Controller(options);
controller.transform(transforms);
}
exports.transform = transform;
//# sourceMappingURL=transform.js.map