Skip to content

Commit

Permalink
Lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
moose-codes committed Mar 29, 2019
1 parent 3ad1002 commit d6f11b9
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/calculator.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,29 @@ exports._check = (x, y) => {
throw new TypeError(`${x} is not a number`);
}
if (typeof y !== 'number') {
throw new TypeError(`${y} is not a number`);
}
throw new TypeError(`${y} is not a number`);
}
};

exports.add = (x, y) => {
exports._check(x,y)
exports._check(x, y);
return x + y;
};

exports.subtract = (x, y) => {
exports._check(x,y)
exports._check(x, y);
return x - y;
};

exports.multiply = (x, y) => {
exports._check(x,y)
exports._check(x, y);
return x * y;
};

exports.divide = (x, y) => {
exports._check(x,y)
exports._check(x, y);
return x / y;
};

module.exports = exports;
module.exports = exports;

0 comments on commit d6f11b9

Please sign in to comment.