summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/example/key_cmp.js
diff options
context:
space:
mode:
authorRebecca Turner <me@re-becca.org>2017-04-12 21:47:49 -0700
committerJeremiah Senkpiel <fishrock123@rocketmail.com>2017-04-25 10:52:01 -0400
commit00842604483e4c2e622dfdb3a97440e07646158f (patch)
treef3346902636a44b6037652523767636bf7e4f2c9 /deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/example/key_cmp.js
parent061c5da010e0d249379618382a499840d38247b8 (diff)
downloadandroid-node-v8-00842604483e4c2e622dfdb3a97440e07646158f.tar.gz
android-node-v8-00842604483e4c2e622dfdb3a97440e07646158f.tar.bz2
android-node-v8-00842604483e4c2e622dfdb3a97440e07646158f.zip
deps: upgrade npm to 4.5.0
PR-URL: https://github.com/nodejs/node/pull/12480 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Diffstat (limited to 'deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/example/key_cmp.js')
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/example/key_cmp.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/example/key_cmp.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/example/key_cmp.js
new file mode 100644
index 0000000000..d5f66752d8
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/example/key_cmp.js
@@ -0,0 +1,7 @@
+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);