From 7cc1a412abfa6a23eb4b5c0581c2099c6ff95a4e Mon Sep 17 00:00:00 2001 From: Tyler Church Date: Thu, 24 Mar 2016 06:51:53 -0700 Subject: [PATCH 1/2] Correct Diff.blobToBuffer documentation. --- lib/diff.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/diff.js b/lib/diff.js index b397ecd2b..86a0cb60b 100644 --- a/lib/diff.js +++ b/lib/diff.js @@ -58,6 +58,19 @@ Diff.prototype.findSimilar = function(opts) { }; var blobToBuffer = Diff.blobToBuffer; +/** + * Directly run a diff between a blob and a buffer. + * @async + * @param {Blob} old_blob Blob for old side of diff, or NULL for empty blob + * @param {String} old_as_path Treat old blob as if it had this filename; can be NULL + * @param {String} buffer Raw data for new side of diff, or NULL for empty + * @param {String} buffer_as_path Treat buffer as if it had this filename; can be NULL + * @param {DiffOptions} opts Options for diff, or NULL for default options + * @param {Function} file_cb Callback for "file"; made once if there is a diff; can be NULL + * @param {Function} binary_cb Callback for binary files; can be NULL + * @param {Function} hunk_cb Callback for each hunk in diff; can be NULL + * @param {Function} line_cb Callback for each line in diff; can be NULL + */ Diff.blobToBuffer= function( old_blob, old_as_path, From 838c1adf92fa99f00eef9c2fc067bedcbb2e3cda Mon Sep 17 00:00:00 2001 From: Tyler Church Date: Thu, 24 Mar 2016 07:04:23 -0700 Subject: [PATCH 2/2] Update Diff.blobToBuffer documentation to make jshint happy. --- lib/diff.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/diff.js b/lib/diff.js index 86a0cb60b..c812c9f9b 100644 --- a/lib/diff.js +++ b/lib/diff.js @@ -62,11 +62,14 @@ var blobToBuffer = Diff.blobToBuffer; * Directly run a diff between a blob and a buffer. * @async * @param {Blob} old_blob Blob for old side of diff, or NULL for empty blob - * @param {String} old_as_path Treat old blob as if it had this filename; can be NULL + * @param {String} old_as_path Treat old blob as if it had this filename; + * can be NULL * @param {String} buffer Raw data for new side of diff, or NULL for empty - * @param {String} buffer_as_path Treat buffer as if it had this filename; can be NULL + * @param {String} buffer_as_path Treat buffer as if it had this filename; + * can be NULL * @param {DiffOptions} opts Options for diff, or NULL for default options - * @param {Function} file_cb Callback for "file"; made once if there is a diff; can be NULL + * @param {Function} file_cb Callback for "file"; made once if there is a diff; + * can be NULL * @param {Function} binary_cb Callback for binary files; can be NULL * @param {Function} hunk_cb Callback for each hunk in diff; can be NULL * @param {Function} line_cb Callback for each line in diff; can be NULL