-
-
Save t-book/e030f7118f9d2ecf7ea5d3e7e7cf03f3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let v = { | |
isNum: n => !isNaN(parseFloat(n)) && isFinite(n), | |
PartiThes: n => { | |
let validates = true; | |
let str = n.split(", "); | |
str.forEach(s => { | |
let substr = s.split(" "); | |
validates = v.isNum(substr[0]) ? validates : false; | |
validates = material.includes(substr[1]) ? validates : false; | |
}); | |
return validates; | |
} | |
}; | |
export {v}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment