Skip to content

Instantly share code, notes, and snippets.

@mintyPT
Last active September 13, 2018 22:06
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 mintyPT/910540ad3d6628af8625972dbd9f66a7 to your computer and use it in GitHub Desktop.
Save mintyPT/910540ad3d6628af8625972dbd9f66a7 to your computer and use it in GitHub Desktop.
js snippets
const toType = obj => ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase();
// https://github.com/DavidTamakloe/silent-lion
function warning(message) {
console.error();
message.split("\n").forEach(function(line) {
console.error(" warning: %s", line);
});
console.error();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment