kanji1024 API

This page computes its answer in the browser. Fetched without running
scripts (for example with a plain HTTP client), you get this guide.
In a browser, or a headless browser that runs scripts, the page body is
replaced by a JSON result. When it is done, the html element carries
data-status="ok", "error" or "guide".

Requests (query string, UTF-8, percent-encoded):

  ?op=encode&text=Hello          encode text
  ?op=encode&hex=48656c6c6f      encode bytes given as hex
  ?op=encode&base64=SGVsbG8=     encode bytes given as base64
      options: seal=1  group=N  wrap=N  sep=ascii

  ?op=decode&kanji=専灰色判      decode
      options: lenient=1
      returns bytes, text (null if not UTF-8), hex, base64, sealOk, warnings

  ?op=describe&c=未末           value, bits, grade and look-alikes per character
  ?op=alphabet                  the full character table
  ?op=version                   the implementation version

Every result has "ok", "op" and "version"; failures add
"error": { "code", "message", "position"? }.

Without a browser, use the same code directly:
  module   ../src/kanji1024.mjs (importable from other pages)
  CLI      node bin/kanji1024.mjs --help   (in the repository)

Specification: https://github.com/didvc/kanji1024/blob/main/SPEC.md