From 644fb825594ad5105a9cbd519726f24b922dd253 Mon Sep 17 00:00:00 2001 From: Mark Stosberg Date: Mon, 3 Nov 2014 15:00:24 -0500 Subject: [PATCH] Clarify in the docs which object is the considered the "old" vs "new". Some diff'ing functions, particularly for testing use the sematics of `diff(actual,expected)`. You see this for example in the `unfunk-diff` library uses this library. Other tools like this one use the sematics of `diff(old,new)`. Either can make sense, but it's not clear which semantics are being used when the example arguments are 'ObjectA' and 'ObjectB'. Updating the example input names clarify which semantics are being used here. --- README.mdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.mdown b/README.mdown index 33d91ba..c4dae11 100644 --- a/README.mdown +++ b/README.mdown @@ -3,7 +3,7 @@ [objectdiff on npm](http://search.npmjs.org/#/objectdiff) -## objectDiff.diff(objectA, objectB) +## objectDiff.diff(oldObject, newObject)
 objectDiff.diff({x: 1}, {x: 2})
@@ -40,7 +40,7 @@ objectDiff.diff({z: {x: 1}}, {z: {y: 2}})
 
-## objectDiff.diffOwnProperties(objectA, objectB) +## objectDiff.diffOwnProperties(oldObject, newObject) Same as objectDiff.diff, but compares only objects' own properties