Skip to content

Commit

Permalink
Squash evil comparison operators
Browse files Browse the repository at this point in the history
  • Loading branch information
tstarck committed Sep 17, 2014
1 parent 99ae743 commit d8ddf2f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ var initialize = exports.initialize = function(argv) {
var initializeDb = exports.initializeDb = function(conf, callback) {
var db_module;

if (typeof(conf.db) == 'string') {
if (typeof(conf.db) === 'string') {
try {
/// db_module = require(conf.db);
db_module = require('../adapters/' + conf.db);
Expand Down
2 changes: 1 addition & 1 deletion lib/controllers/retry.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Retry.prototype.execute_task = function(task) {
task.payload = new Buffer(task.payload_base64, 'base64');
}
else if ('payload' in task) {
if (typeof(task.payload) == 'object') {
if (typeof task.payload === 'object') {
task.payload = JSON.stringify(task.payload);
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/daemon/injector.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Injector.prototype.check_and_amend_task_for_injection = function(task) {
else if ('at' in task) {
try {
var date = new Date(task.at);
if (date.toString() == 'Invalid Date') {
if (date.toString() === 'Invalid Date') {
throw (date);
}
}
Expand Down
3 changes: 1 addition & 2 deletions lib/test-helpers/component-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var log = lib.require('log');
var global_instances = [];

var setup_component_and_wait_for_connect = exports.setup_component_and_wait_for_connect = function( component, conf, callback ) {
var component_module = ( component == 'controller') ? lib.require( 'controllers/retry' ) : lib.require( 'daemon/' + component );
var component_module = ( component === 'controller') ? lib.require( 'controllers/retry' ) : lib.require( 'daemon/' + component );
var component_instance = component_module( conf );
global_instances.push( component_instance );
component_instance.on( 'connect', function() {
Expand All @@ -34,4 +34,3 @@ exports.teardown = function( done ) {
done( error );
} );
};

0 comments on commit d8ddf2f

Please sign in to comment.