Skip to content

Instantly share code, notes, and snippets.

@t-book
Created December 2, 2018 09:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save t-book/e030f7118f9d2ecf7ea5d3e7e7cf03f3 to your computer and use it in GitHub Desktop.
Save t-book/e030f7118f9d2ecf7ea5d3e7e7cf03f3 to your computer and use it in GitHub Desktop.
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