Skip to content

Instantly share code, notes, and snippets.

@ppraksa
Last active March 23, 2017 12:34
Show Gist options
  • Save ppraksa/73813d8b2458c71688ba47500003efcb to your computer and use it in GitHub Desktop.
Save ppraksa/73813d8b2458c71688ba47500003efcb to your computer and use it in GitHub Desktop.
extend to the number
// is Number this = global scope (window)
if(typeof this.isN != "function" && (this.constructor.name).toLowerCase() === "window") {
this.isN = function (...args) {
let newArgs = [];
newArgs = args.map((e) => {
return !isNaN(e)
});
return newArgs;
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment