| Index: frog/lib/core.js
|
| diff --git a/frog/lib/core.js b/frog/lib/core.js
|
| index 3f5a872d20b2612ba7b890d87dd0d8a912bc2f15..48b2b1370d1275ca75bcb08dc1183397920cade7 100644
|
| --- a/frog/lib/core.js
|
| +++ b/frog/lib/core.js
|
| @@ -174,6 +174,13 @@ function $assert(test, text, url, line, column) {
|
| if (!test) $throw(new AssertError(text, url, line, column));
|
| }
|
|
|
| +function $notnull_bool(test) {
|
| + if (test == null || typeof(test) != 'boolean') {
|
| + $throw(new TypeError('must be "true" or "false"'));
|
| + }
|
| + return test === true;
|
| +}
|
| +
|
| function $throw(e) {
|
| // If e is not a value, we can use V8's captureStackTrace utility method.
|
| // TODO(jmesserly): capture the stack trace on other JS engines.
|
|
|