Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTechsTech committed Feb 5, 2018
1 parent b59616c commit eab1bbb
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 21 deletions.
8 changes: 4 additions & 4 deletions lib/add.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
var path = require('path');
var when = require('when');
var u = {
files : require('../util/files'),
run : require('../util/run'),
files: require('../util/files'),
run: require('../util/run'),
switches: require('../util/switches'),
path : require('../util/path')
path: require('../util/path')
};

/**
Expand All @@ -22,7 +22,7 @@ var u = {
module.exports = function (archive, files, optionspath, options) {
// Check options for `path` to pass path to binary to be parsed by `run`.
var command = u.path(optionspath);
var newoptions = ( options != null ) ? options : ( optionspath.path == null ) ? optionspath : '';
var newoptions = ( options !== null ) ? options : ( optionspath.path === null ) ? optionspath : '';
return when.promise(function (resolve, reject, progress) {

// Convert array of files into a string if needed.
Expand Down
8 changes: 4 additions & 4 deletions lib/delete.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
'use strict';
var when = require('when');
var u = {
files : require('../util/files'),
run : require('../util/run'),
files: require('../util/files'),
run: require('../util/run'),
switches: require('../util/switches'),
path : require('../util/path')
path: require('../util/path')
};

/**
Expand All @@ -19,7 +19,7 @@ var u = {
module.exports = function (archive, files, optionspath, options) {
// Check options for `path` to pass path to binary to be parsed by `run`.
var command = u.path(optionspath);
var newoptions = ( options != null ) ? options : ( optionspath.path == null ) ? optionspath : '';
var newoptions = ( options !== null ) ? options : ( optionspath.path === null ) ? optionspath : '';
return when.promise(function (resolve, reject) {

// Convert array of files into a string if needed.
Expand Down
6 changes: 3 additions & 3 deletions lib/extract.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
var path = require('path');
var when = require('when');
var u = {
run : require('../util/run'),
run: require('../util/run'),
switches: require('../util/switches'),
path : require('../util/path')
path: require('../util/path')
};

/**
Expand All @@ -20,7 +20,7 @@ var u = {
module.exports = function (archive, dest, optionspath, options) {
// Check options for `path` to pass path to binary to be parsed by `run`.
var command = u.path(optionspath);
var newoptions = ( options != null ) ? options : ( optionspath.path == null ) ? optionspath : '';
var newoptions = ( options !== null ) ? options : ( optionspath.path === null ) ? optionspath : '';
return when.promise(function (resolve, reject, progress) {

// Create a string that can be parsed by `run`.
Expand Down
4 changes: 2 additions & 2 deletions lib/extractFull.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var when = require("when");
var u = {
run: require("../util/run"),
switches: require("../util/switches"),
path : require('../util/path')
path: require('../util/path')
};

/**
Expand All @@ -20,7 +20,7 @@ var u = {
module.exports = function(archive, dest, optionspath, options) {
// Check options for `path` to pass path to binary to be parsed by `run`.
var command = u.path(optionspath);
var newoptions = ( options != null ) ? options : ( optionspath.path == null ) ? optionspath : '';
var newoptions = ( options !== null ) ? options : ( optionspath.path === null ) ? optionspath : '';
return when.promise(function(resolve, reject, progress) {
// Create a string that can be parsed by `run`.
command += ' x "' + archive + '" -o"' + dest + '" ';
Expand Down
4 changes: 2 additions & 2 deletions lib/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var when = require("when");
var u = {
run: require("../util/run"),
switches: require("../util/switches"),
path : require('../util/path')
path: require('../util/path')
};

/**
Expand All @@ -19,7 +19,7 @@ var u = {
module.exports = function(archive, optionspath, options) {
// Check options for `path` to pass path to binary to be parsed by `run`.
var command = u.path(optionspath);
var newoptions = ( options != null ) ? options : ( optionspath.path == null ) ? optionspath : '';
var newoptions = ( options !== null ) ? options : ( optionspath.path === null ) ? optionspath : '';
return when.promise(function(resolve, reject, progress) {
var spec = {};
/* jshint maxlen: 130 */
Expand Down
6 changes: 3 additions & 3 deletions lib/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
var path = require('path');
var when = require('when');
var u = {
run : require('../util/run'),
run: require('../util/run'),
switches: require('../util/switches'),
path : require('../util/path')
path: require('../util/path')
};

/**
Expand All @@ -19,7 +19,7 @@ var u = {
module.exports = function (archive, optionspath, options) {
// Check options for `path` to pass path to binary to be parsed by `run`.
var command = u.path(optionspath);
var newoptions = ( options != null ) ? options : ( optionspath.path == null ) ? optionspath : '';
var newoptions = ( options !== null ) ? options : ( optionspath.path === null ) ? optionspath : '';
return when.promise(function (resolve, reject, progress) {

// Create a string that can be parsed by `run`.
Expand Down
6 changes: 3 additions & 3 deletions lib/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ var path = require('path');
var when = require('when');
var u = {
run: require('../util/run'),
switches : require('../util/switches'),
path : require('../util/path')
switches: require('../util/switches'),
path: require('../util/path')
};

/**
Expand All @@ -20,7 +20,7 @@ var u = {
module.exports = function (archive, files, optionspath, options) {
// Check options for `path` to pass path to binary to be parsed by `run`.
var command = u.path(optionspath);
var newoptions = ( options != null ) ? options : ( optionspath.path == null ) ? optionspath : '';
var newoptions = ( options !== null ) ? options : ( optionspath.path === null ) ? optionspath : '';
return when.promise(function (resolve, reject, progress) {

// Create a string that can be parsed by `run`.
Expand Down

0 comments on commit eab1bbb

Please sign in to comment.