dino_runtime 0.1.1

A Rust runtime for Deno
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
const { text_encoder_new, text_encoder_encode } = Deno.core.ops;

class TextEncoder {
  #handle;
  constructor() {
    this.#handle = text_encoder_new();
  }
  encode(input) {
    return text_encoder_encode(this.#handle, String(input));
  }
}

globalThis.TextEncoder = TextEncoder;