Sha256: 11b1d8a754cbebf334d63e698dce5b98b97c3d18a87fb479452161d24a06ca35

Contents?: true

Size: 412 Bytes

Versions: 11

Compression:

Stored size: 412 Bytes

Contents

var breakable = require("./breakable");
var esprima = require("esprima").parse;
var traverse = require("ast-traverse");
var ast = esprima("f(!x, y)");

var val = breakable(function(brk) {
    traverse(ast, {pre: function(node) {
        if (node.type === "UnaryExpression" && node.operator === "!") {
            brk(node.argument);
        }
    }});
});

console.dir(val); // { type: 'Identifier', name: 'x' }

Version data entries

11 entries across 11 versions & 4 rubygems

Version Path
ilog-0.4.1 node_modules/breakable/examples/example.js
ilog-0.4.0 node_modules/breakable/examples/example.js
ilog-0.3.3 node_modules/breakable/examples/example.js
xcodebuild-helper-1.2.5 externals/ios-sim-master/node_modules/breakable/examples/example.js
xcodebuild-helper-1.2.3 externals/ios-sim-master/node_modules/breakable/examples/example.js
es6_tilt-0.1.2 test/dummy/app/assets/javascripts/node_modules/breakable/examples/example.js
es6_tilt-0.1.1 test/dummy/app/assets/javascripts/node_modules/breakable/examples/example.js
es6_tilt-0.1.0 test/dummy/app/assets/javascripts/node_modules/breakable/examples/example.js
gulp_assets-1.0.0.pre.5 template/node_modules/babel-core/node_modules/regenerator/node_modules/defs/node_modules/breakable/examples/example.js
gulp_assets-1.0.0.pre.4 template/node_modules/babel-core/node_modules/regenerator/node_modules/defs/node_modules/breakable/examples/example.js
gulp_assets-1.0.0.pre.3 template/node_modules/babel-core/node_modules/regenerator/node_modules/defs/node_modules/breakable/examples/example.js