source: node_modules/json-stable-stringify/example/key_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: 201 bytes
Line 
1'use strict';
2
3var stringify = require('../');
4
5var obj = { c: 8, b: [{ z: 6, y: 5, x: 4 }, 7], a: 3 };
6var s = stringify(obj, function (a, b) {
7 return b.key.localeCompare(a.key);
8});
9console.log(s);
Note: See TracBrowser for help on using the repository browser.