source: node_modules/json-stable-stringify/example/value_cmp.js@ d24f17c

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

Initial commit

  • Property mode set to 100644
File size: 210 bytes
Line 
1'use strict';
2
3var stringify = require('../');
4
5var obj = { d: 6, c: 5, b: [{ z: 3, y: 2, x: 1 }, 9], a: 10 };
6
7var s = stringify(obj, function (a, b) {
8 return a.value < b.value ? 1 : -1;
9});
10
11console.log(s);
Note: See TracBrowser for help on using the repository browser.