Open
Description
Following bfd6693 nodejs now crashes with undefined use of TextEncoder. According to this post it is fixed with the node util package like this:
const util = require('util');
this.encoder = new util.TextEncoder("utf-8");
And indeed this works when I hack it into the build. It needs to be integrated so that the code will work on both node and browser out of the box.