MCPcopy Create free account
hub / github.com/0hq/WebGPT / encode

Method encode

tokenizer.js:37–39  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

35 }
36
37 encode(str) {
38 return str.split("").map((x) => this.encoder[x]);
39 }
40
41 decode(arr) {
42 return arr.map((x) => this.decoder[x]).join("");

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected