Skip to content
Branch: 2.x
Go to file
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Dreditor

An event and Promise based JavaScript parser and render (to HTML) for unified diff files.

// Get a patch from somewhere on the file system.
let string = require('fs').readFileSync('./some-unified-diff.patch', 'utf8');

// Create a new Dreditor instance.
let dreditor = require('dreditor')();

dreditor
  // Parse the data.
  .parse(string)
  .then(function (/** @type {Parser} */ parser) {
    // Do stParserer.render();
  })
  .then(function (/** @type {Element} */ output) {
    output.addClass('my-custom-class');
    console.log(output.toString());
  });

About

An event and Promise based JavaScript parser and render (to HTML) for unified diff files.

Resources

License

You can’t perform that action at this time.