From de3863ceb993e287362deb4b73e92f4587ae7cbc Mon Sep 17 00:00:00 2001 From: Carlos P Navarrete Filho Date: Tue, 27 Dec 2016 11:28:03 -0200 Subject: [PATCH] Add documentation for first part of getDiff --- src/getDiff.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/getDiff.js b/src/getDiff.js index ea54d16..9ca5d6c 100644 --- a/src/getDiff.js +++ b/src/getDiff.js @@ -1,5 +1,10 @@ import { diffChars } from 'diff' +/*Wrapper around jsdiff's diffChars. It returns an object that +* describes which parts of two given strings for comparison +* (original and new) were changed by addition, subtraction or +* remained unchanged. +*/ function diff (value1 = '', value2 = '') { return diffChars(value1, value2) }