I would suggest to refactor to Typescript instead of Javascript. No more if(!Number(amount)){ return false }
Anyway, The plus is everyone could know what type of parameter can they put through the function, etc. which is really good for new contributors.