Simple email application for Android. Original source code: https://framagit.org/dystopia-project/simple-email
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
260 B

  1. var traverse = require('traverse');
  2. var obj = {
  3. a : [1,2,3],
  4. b : 4,
  5. c : [5,6],
  6. d : { e : [7,8], f : 9 },
  7. };
  8. var leaves = traverse(obj).reduce(function (acc, x) {
  9. if (this.isLeaf) acc.push(x);
  10. return acc;
  11. }, []);
  12. console.dir(leaves);