Readme

Populated with the following:

import { blob } from "https://esm.town/v/std/blob?v=12";

fetch("https://unicode.org/Public/UNIDATA/UnicodeData.txt").then(async function(response) {
  const text = await response.text();
  const data = {};
  text.split("\n").forEach((line) => {
    const [code, name] = line.split(";");
    data[code] = name;
  });

  await blob.setJSON("unicode_names", data);
});
1
2
3
4
5
6
import { blob } from "https://esm.town/v/std/blob?v=12";
export async function nameOfCodepoint(codepoint: string) {
const names = await blob.getJSON("unicode_names");
return names[codepoint];
}
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
June 12, 2024