Re: [whatwg/streams] better-assert is broken (#985)

`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