iso2020Escapes

Returns all the ISO-2020-JP escape sequences

Created by: hackvertor
Installed 1 times

Category: Charsets

Created on: Thursday, December 19, 2024 at 3:04:15 PM

Updated on: Monday, December 30, 2024 at 8:12:20 AM

This is a built in tag
Tag arguments
[]
Code
class iso2020Escapes {
  encode(input) {
    const escapeSequences = [
      String.fromCodePoint(0x1b, 0x28, 0x42),
      String.fromCodePoint(0x1b, 0x28, 0x4a),
      String.fromCodePoint(0x1b, 0x24, 0x40),
      String.fromCodePoint(0x1b, 0x24, 0x42),
      String.fromCodePoint(0x1b, 0x28, 0x49),
    ];
    return escapeSequences.join("\n");
  }
}