Sha256: 0d0561c91c5ece8177ec25aa7e92e3db3d7857f107774d1cabf98499f070e0b5

Contents?: true

Size: 390 Bytes

Versions: 9

Compression:

Stored size: 390 Bytes

Contents

var traverse = require('traverse');

var id = 54;
var callbacks = {};
var obj = { moo : function () {}, foo : [2,3,4, function () {}] };

var scrubbed = traverse(obj).map(function (x) {
    if (typeof x === 'function') {
        callbacks[id] = { id : id, f : x, path : this.path };
        this.update('[Function]');
        id++;
    }
});

console.dir(scrubbed);
console.dir(callbacks);

Version data entries

9 entries across 6 versions & 4 rubygems

Version Path
boring_generators-0.5.0 tmp/templates/app_template/node_modules/traverse/examples/json.js
boring_generators-0.4.0 tmp/templates/app_template/node_modules/traverse/examples/json.js
trans-0.5.10 template/node_modules/grunt-contrib-nodeunit/node_modules/nodeunit/node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/traverse/examples/json.js
trans-0.5.10 template/node_modules/grunt-contrib-nodeunit/node_modules/nodeunit/node_modules/tap/node_modules/difflet/node_modules/traverse/examples/json.js
trans-0.5.9 template/node_modules/grunt-contrib-nodeunit/node_modules/nodeunit/node_modules/tap/node_modules/difflet/node_modules/traverse/examples/json.js
trans-0.5.9 template/node_modules/grunt-contrib-nodeunit/node_modules/nodeunit/node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/traverse/examples/json.js
iron_worker_ng-0.10.1 iron_worker_examples/binary/phantom-nodejs/node_modules/phantom/node_modules/dnode-protocol/node_modules/traverse/examples/json.js
iron_worker_ng-0.10.1 iron_worker_examples/binary/phantom-nodejs/node_modules/phantom/node_modules/dnode/node_modules/dnode-protocol/node_modules/traverse/examples/json.js
holmes-0.0.1 lib/holmes/node_modules/detective/node_modules/burrito/node_modules/traverse/examples/json.js