How to use the hyperactiv.computed function in hyperactiv

To help you get started, we’ve selected a few hyperactiv examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zgsrc / ibjs / runtime / index.js View on Github external
tree.body = tree.body.map(line => {
        if (line.type == "LabeledStatement") {
            if (line.label.name == "when") {
                if (line.body.type == "IfStatement") {
                    console.log("Valid when statement")
                    return computed(line.body)
                }
                else throw new Error("When statement must take an if condition")
            }
            else if (line.label.name == "set") {
                return computedStatement(line.body)
            }
            else return line;
        }
        else return line;
    });
github zgsrc / ibjs / model / container.js View on Github external
            Object.defineProperty(this, "rule", { value: fn => computed(fn) });
            return _this;

hyperactiv

Super small observable & reactive objects library.

MIT
Latest version published 2 years ago

Package Health Score

52 / 100
Full package analysis