Skip to content

Instantly share code, notes, and snippets.

@kaheglar
Created June 23, 2011 12:38
Show Gist options
  • Save kaheglar/1042463 to your computer and use it in GitHub Desktop.
Save kaheglar/1042463 to your computer and use it in GitHub Desktop.
jQuery assert - throw error msg if condition false
(function($) {
$.assert = function(condition, msg) {
if (!condition) {
$.error(msg);
}
};
})(jQuery);
@ripper234
Copy link

Hmm, or maybe not ... my bad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment