Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions 16 lib/diff.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,22 @@ 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,
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.