How to use the forEach function from traverse
Find comprehensive JavaScript traverse.forEach code examples handpicked from public code repositorys.
GitHub: jofelgandeza/budget
11 12 13 14 15 16 17 18 19 20 21
assert.deepEqual(obj, { a : 1, b : 20, c : [ 3, 40 ] }); }; exports.mutateT = function () { var obj = { a : 1, b : 2, c : [ 3, 4 ] }; var res = Traverse.forEach(obj, function (x) { if (typeof x === 'number' && x % 2 === 0) { this.update(x * 10); } });
0
0
1
traverse.deepEqual is the most popular function in traverse (8 examples)