mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2025-09-23 13:50:19 +00:00
push all website files
This commit is contained in:
16
website/functions/node_modules/traverse/examples/json.js
generated
vendored
Normal file
16
website/functions/node_modules/traverse/examples/json.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
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);
|
Reference in New Issue
Block a user