source: node_modules/traverse/examples/negative.js

main
Last change on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 206 bytes
Line 
1'use strict';
2
3var traverse = require('traverse');
4var obj = [5, 6, -3, [7, 8, -2, 1], { f: 10, g: -13 }];
5
6traverse(obj).forEach(function (x) {
7 if (x < 0) { this.update(x + 128); }
8});
9
10console.dir(obj);
Note: See TracBrowser for help on using the repository browser.