Created
May 19, 2016 02:05
-
-
Save joshuacerbito/0fa5aaf2cc3dec7276a2b30f48c92fb8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function assert (condition, message) { | |
if (!condition) { | |
message = message || "Assertion failed"; | |
if (typeof Error !== "undefined") { | |
throw new Error(message); | |
} | |
throw message; // Fallback | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment