This commit is contained in:
be5invis 2023-03-09 23:20:10 -08:00
parent 7b6550f42d
commit ff1edfc24c
7 changed files with 53 additions and 39 deletions

View file

@ -1,7 +1,11 @@
import ucdNames from "@unicode/unicode-15.0.0/Names/index.js";
for (let i = 2; i < process.argv.length; i++) {
const lch = parseInt(process.argv[i], 16);
const codes = process.argv
.slice(2)
.map(x => parseInt(x, 16))
.sort((a, b) => a - b);
for (const lch of codes) {
const name = ucdNames.get(lch);
console.log(" -", name, `(\`U+${lch.toString(16).toUpperCase().padStart(4, "0")}\`).`);
}