summaryrefslogtreecommitdiff
path: root/util.ts
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2018-11-07 13:16:07 -0500
committerRyan Dahl <ry@tinyclouds.org>2018-11-07 13:16:07 -0500
commit8610e3578c923be2b7d758e75ea370801abf8574 (patch)
tree605c8b5f400c6a0daf29282250573816341e2cef /util.ts
parentabe47d10c97f5cff671d3565a5a985c2ef203d4d (diff)
First pass at bufio.
Original: https://github.com/denoland/deno_std/commit/c5cc6959705c310f4f7a864d77aae54171707c04
Diffstat (limited to 'util.ts')
-rw-r--r--util.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/util.ts b/util.ts
new file mode 100644
index 000000000..decf4d043
--- /dev/null
+++ b/util.ts
@@ -0,0 +1,6 @@
+
+export function assert(cond: boolean, msg = "assert") {
+ if (!cond) {
+ throw Error(msg);
+ }
+}