You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suggestion: Potentially allow pass in for TextEncoder or change to NodeJS reco:
var util = require('util');
let encoder = new util.TextEncoder();
let uint8Array = encoder.encode("Hello");
console.log(uint8Array);
The text was updated successfully, but these errors were encountered:
sshadmand
changed the title
Error when running tests in Node 12.22.0
"TextEncoder is not defined" error when running tests in Node 12.22.0
Dec 18, 2022
By using the Buffer class in this way, you can encode and decode strings as UTF-8 without using the TextEncoder and TextDecoder classes. This can be useful if you need to support earlier versions of Node.js that do not have these classes in the util module.
syonfox
pushed a commit
to syonfox/gptoken
that referenced
this issue
Jan 7, 2023
Package installed
When ran
Which references: https://github.com/latitudegames/GPT-3-Encoder/blob/master/Encoder.js#L21
Suggestion: Potentially allow pass in for TextEncoder or change to NodeJS reco:
The text was updated successfully, but these errors were encountered: