From 291803c31f829fe0d32bb3207bc11def95a7408c Mon Sep 17 00:00:00 2001 From: Nevena Bojovic Date: Tue, 1 Mar 2022 20:05:50 +0100 Subject: Urađena test aplikacija. Povezan front i back. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../node_modules/fast-json-stable-stringify/test/cmp.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 sandbox/testAppNevena/Front/node_modules/fast-json-stable-stringify/test/cmp.js (limited to 'sandbox/testAppNevena/Front/node_modules/fast-json-stable-stringify/test/cmp.js') diff --git a/sandbox/testAppNevena/Front/node_modules/fast-json-stable-stringify/test/cmp.js b/sandbox/testAppNevena/Front/node_modules/fast-json-stable-stringify/test/cmp.js new file mode 100644 index 00000000..4efd6b59 --- /dev/null +++ b/sandbox/testAppNevena/Front/node_modules/fast-json-stable-stringify/test/cmp.js @@ -0,0 +1,13 @@ +'use strict'; + +var test = require('tape'); +var stringify = require('../'); + +test('custom comparison function', function (t) { + t.plan(1); + 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; + }); + t.equal(s, '{"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3}'); +}); -- cgit v1.2.3