Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

cmp examples

  • Loading branch information...
commit a33d5f0f693935e8572a6899e05ec0294a56498c 1 parent df98a23
@substack authored
Showing with 12 additions and 0 deletions.
  1. +6 −0 example/cmp_array.js
  2. +6 −0 example/cmp_object.js
View
6 example/cmp_array.js
@@ -0,0 +1,6 @@
+var difflet = require('../');
+var s = difflet({ indent : 2, comment : true }).compare(
+ [ 1, [2,3,{a:4}], 3 ],
+ [ 1, [[5],6,7], 4 ]
+);
+process.stdout.write(s);
View
6 example/cmp_object.js
@@ -0,0 +1,6 @@
+var difflet = require('../');
+var s = difflet({ indent : 2, comment : true }).compare(
+ { z : 6, a : 'abcdefgh', b : [ 31, 'xxt' ] },
+ { x : 5, a : 'abdcefg', b : [ 51, 'xxs' ] }
+);
+process.stdout.write(s);
Please sign in to comment.
Something went wrong with that request. Please try again.