- From: Mattias Buelens <notifications@github.com>
- Date: Fri, 15 Feb 2019 06:25:47 -0800
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 15 February 2019 14:26:14 UTC
`better-assert` expects to be run in a Node environment. I believe browserify can automatically replace built-in Node modules like `assert` with a browser-compatible version, so it should be possible to just replace `better-assert` with `assert`. Alternatively, we can use something like this, which will work regardless of environment: ```js class AssertionError extends Error {} function assert(test) { if (!test) { throw new AssertionError(); } } ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/whatwg/streams/issues/985#issuecomment-464068035
Received on Friday, 15 February 2019 14:26:14 UTC