Sha256: 8bfb1825ceaa31e04eb55d48796bd1ebb599d61921f9ed632238482258c2ade3

Contents?: true

Size: 177 Bytes

Versions: 328

Compression:

Stored size: 177 Bytes

Contents

var stringify = require('../');

var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
var s = stringify(obj, function (a, b) {
    return a.key < b.key ? 1 : -1;
});
console.log(s);

Version data entries

328 entries across 180 versions & 26 rubygems

Version Path
govuk_publishing_components-17.9.0 node_modules/fast-json-stable-stringify/example/key_cmp.js
govuk_publishing_components-17.9.0 node_modules/json-stable-stringify/example/key_cmp.js
govuk_publishing_components-17.9.0 node_modules/json-stable-stringify-without-jsonify/example/key_cmp.js
govuk_publishing_components-17.8.0 node_modules/json-stable-stringify-without-jsonify/example/key_cmp.js
govuk_publishing_components-17.8.0 node_modules/json-stable-stringify/example/key_cmp.js
govuk_publishing_components-17.8.0 node_modules/fast-json-stable-stringify/example/key_cmp.js
govuk_publishing_components-17.7.0 node_modules/json-stable-stringify/example/key_cmp.js
govuk_publishing_components-17.7.0 node_modules/json-stable-stringify-without-jsonify/example/key_cmp.js
govuk_publishing_components-17.7.0 node_modules/fast-json-stable-stringify/example/key_cmp.js
govuk_publishing_components-17.6.1 node_modules/json-stable-stringify/example/key_cmp.js
govuk_publishing_components-17.6.1 node_modules/json-stable-stringify-without-jsonify/example/key_cmp.js
govuk_publishing_components-17.6.1 node_modules/fast-json-stable-stringify/example/key_cmp.js
govuk_publishing_components-17.6.0 node_modules/json-stable-stringify/example/key_cmp.js
govuk_publishing_components-17.6.0 node_modules/json-stable-stringify-without-jsonify/example/key_cmp.js
govuk_publishing_components-17.6.0 node_modules/fast-json-stable-stringify/example/key_cmp.js
govuk_publishing_components-17.5.0 node_modules/json-stable-stringify/example/key_cmp.js
govuk_publishing_components-17.5.0 node_modules/json-stable-stringify-without-jsonify/example/key_cmp.js
govuk_publishing_components-17.5.0 node_modules/fast-json-stable-stringify/example/key_cmp.js
govuk_publishing_components-17.4.0 node_modules/json-stable-stringify/example/key_cmp.js
govuk_publishing_components-17.4.0 node_modules/fast-json-stable-stringify/example/key_cmp.js