Skip to content

Commit

Permalink
Fixed jshint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlivingrooms committed Mar 10, 2015
1 parent 1aa2957 commit 11858e7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var gulp = require('gulp'),

var production = process.env.NODE_ENV === 'production';

function handleError(task) {
function handleError() {
return function(err) {
console.log(err);
};
Expand All @@ -32,7 +32,7 @@ function scripts(watch) {

rebundle = function() {
var stream = bundler.bundle();
stream.on('error', handleError('Browserify'));
stream.on('error', handleError());
stream = stream.pipe(source('bundle.js'));
return stream.pipe(gulp.dest('./public/js'));
};
Expand Down
10 changes: 5 additions & 5 deletions routes/wikimaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var MAX_NUMBER_OF_LINKS = 4;
var MAX_NUMBER_OF_NODES = 200;
var DEFAULT_LINK_LENGTH = 20;

var server = Oriento({
var server = new Oriento({
host: 'localhost',
port: 2424,
username: 'root',
Expand Down Expand Up @@ -95,7 +95,7 @@ var generateWikiMap = function(titleStr, res){
};

var createLink = function(source, target){
return {"source": findNode(source), "sourceName": source, "target": findNode(target), "targetName": target, "value": DEFAULT_LINK_LENGTH};
return {'source': findNode(source), 'sourceName': source, 'target': findNode(target), 'targetName': target, 'value': DEFAULT_LINK_LENGTH};
};

var createLinkObjects = function(parentNode, links){
Expand All @@ -108,7 +108,7 @@ var generateWikiMap = function(titleStr, res){

var addNode = function(title){
if (!isNodeInList(title)){
nodes.push({"id": title});
nodes.push({'id': title});
}
};

Expand Down Expand Up @@ -164,8 +164,8 @@ var generateWikiMap = function(titleStr, res){

// remove multiple, leading or trailing spaces
function trim(s) {
s = s.replace(/(^\s*)|(\s*$)/gi,"");
s = s.replace(/[ ]{2,}/gi," ");
s = s.replace(/(^\s*)|(\s*$)/gi,'');
s = s.replace(/[ ]{2,}/gi,' ');
s = s.replace(/\n /,"\n"); return s;
}

Expand Down

0 comments on commit 11858e7

Please sign in to comment.