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.

8 lines 289 B
export function evaluateFormula(formula, scope = {}) { const keys = Object.keys(scope); const values = keys.map(key => scope[key]); const fn = new Function(...keys, `return ${formula}`); const result = fn(...values); return result; } //# sourceMappingURL=formula.js.map