Skip to content

Commit

Permalink
add check input to mathString
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeljavan committed Mar 7, 2019
1 parent 577eb7d commit afc716a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/mathString.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { checkInput } from './checkPhrase';
import { solveBetweenParantheses, solveMathPhrases } from './solveModules';

const solve = (input: string) => {
checkInput(input);
let result = solveBetweenParantheses(input);
result = solveMathPhrases(result);
return +result > 0 ? result.replace('+', '') : result;
Expand Down

0 comments on commit afc716a

Please sign in to comment.