Skip to content
This repository
Browse code

cmp examples

  • Loading branch information...
commit a33d5f0f693935e8572a6899e05ec0294a56498c 1 parent df98a23
James Halliday authored February 20, 2012
6  example/cmp_array.js
... ...
@@ -0,0 +1,6 @@
  1
+var difflet = require('../');
  2
+var s = difflet({ indent : 2, comment : true }).compare(
  3
+    [ 1, [2,3,{a:4}], 3 ],
  4
+    [ 1, [[5],6,7], 4 ]
  5
+);
  6
+process.stdout.write(s);
6  example/cmp_object.js
... ...
@@ -0,0 +1,6 @@
  1
+var difflet = require('../');
  2
+var s = difflet({ indent : 2, comment : true }).compare(
  3
+    { z : 6, a : 'abcdefgh', b : [ 31, 'xxt' ] },
  4
+    { x : 5, a : 'abdcefg', b : [ 51, 'xxs' ] }
  5
+);
  6
+process.stdout.write(s);

0 notes on commit a33d5f0

Please sign in to comment.
Something went wrong with that request. Please try again.