How to use the san/dist/san.spa.modern.js.parseExpr function in san

To help you get started, we’ve selected a few san 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 krausest / js-framework-benchmark / frameworks / non-keyed / san / src / store.es6.js View on Github external
updateData(mod = 10) {
        // Just assigning setting each tenth this.data doesn't cause a redraw, the following does:
        var newData = this.data.slice(0);
        var expr = san.parseExpr('rows[0].label');
        for (let i = 0; i < this.data.length; i += mod) {
            let newRow = Object.assign({}, this.data[i], { label: this.data[i].label + ' !!!' });
            newData[i] = newRow;
            this.fires.push({
                type: 1,
                expr: {
                    type: expr.type,
                    paths: [
                        expr.paths[0],
                        { type: expr.paths[1].type, value: i },
                        expr.paths[2]
                    ],
                    raw: 'rows[' + i + '].label'
                },
                value: newRow.label,
                option: {}
github krausest / js-framework-benchmark / san-v3.5.5-non-keyed / src / store.es6.js View on Github external
updateData(mod = 10) {
        // Just assigning setting each tenth this.data doesn't cause a redraw, the following does:
        var newData = this.data.slice(0);
        var expr = san.parseExpr('rows[0].label');
        for (let i = 0; i < this.data.length; i += mod) {
            let newRow = Object.assign({}, this.data[i], {label: this.data[i].label + ' !!!'});
            newData[i] = newRow;
            this.fires.push({
                type: 1,
                expr: {
                    type: expr.type,
                    paths: [
                        expr.paths[0], 
                        {type: expr.paths[1].type, value: i}, 
                        expr.paths[2]
                    ],
                    raw: 'rows[' + i + '].label'
                },
                value: newRow.label,
                option: {}