Skip to content

Instantly share code, notes, and snippets.

@MatthewVita
MatthewVita / Empty.js
Last active August 29, 2015 14:07
Empty.js - Convenience function, checks for "empty" values
//@desc: Convenience function that
//checks for "empty" values
//@use: console.log(Empty('hello!')); //false
function Empty(val) {
return (typeof(val) === 'undefined' || typeof(val) === 'null' || val === '' || typeof(val) === 'NaN' || val === false);
}
@MatthewVita
MatthewVita / keybase.md
Last active August 29, 2015 13:57
keybase.md

Keybase proof

I hereby claim:

  • I am MatthewVita on github.
  • I am matthewvita (https://keybase.io/matthewvita) on keybase.
  • I have a public key whose fingerprint is A1B4 7008 225E 3FB2 7427 CE4E 8195 0C2C 22C8 46C9

To claim this, I am signing this object:

@MatthewVita
MatthewVita / KOTemplateLoader.js
Last active August 29, 2015 13:57
KOTemplateLoader.js - Loader that easily renders external Knockout.js templates [jQuery dependency]
/*
* @desc: loads an external
* HTML Knockout.js template
* file, places it in the DOM,
* and applies the KO bindings
*
* @param: tmplFile - the template
* file
*
* @param: targetElem - the target