Skip to content

Commit

Permalink
Stop using node syntax.
Browse files Browse the repository at this point in the history
  • Loading branch information
Spencer Thang committed Sep 11, 2015
1 parent 3d233d2 commit accbd3c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
7 changes: 1 addition & 6 deletions difflib.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ DAMAGE.
***/
/* Author: Chas Emerick <cemerick@snowtide.com> */

exports = module.exports = {};

var __whitespace = {" ":true, "\t":true, "\n":true, "\f":true, "\r":true};

var difflib = {
Expand Down Expand Up @@ -412,7 +410,4 @@ var difflib = {
this.a = this.b = null;
this.set_seqs(a, b);
}
};

exports.stringAsLines = difflib.stringAsLines;
exports.SequenceMatcher = difflib.SequenceMatcher;
};
6 changes: 1 addition & 5 deletions diffview.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ The views and conclusions contained in the software and documentation are those
authors and should not be interpreted as representing official policies, either expressed
or implied, of Chas Emerick.
*/
exports = module.exports = {};
var difflib = require("./difflib");

diffview = {
/**
Expand Down Expand Up @@ -208,6 +206,4 @@ diffview = {
differences: differences
}
}
};

exports.buildView = diffview.buildView;
};
5 changes: 3 additions & 2 deletions test/diffview_tests.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
var expect = require("chai").expect;
var diffview = require("../diffview.js");
var difflib = require("../difflib.js");
var jsdom = require("jsdom").jsdom;
var document = jsdom("<html></html>");
global.document = document;

eval(require('fs').readFileSync('difflib.js', 'utf8'));
eval(require('fs').readFileSync('diffview.js', 'utf8'));

describe("diffview", function() {
describe(".buildView()", function() {
it("can build view with a difference", function () {
Expand Down

0 comments on commit accbd3c

Please sign in to comment.