Skip to content

Instantly share code, notes, and snippets.

View jhmaster2000's full-sized avatar
๐Ÿ‘๏ธโ€๐Ÿ—จ๏ธ

jhmaster jhmaster2000

๐Ÿ‘๏ธโ€๐Ÿ—จ๏ธ
View GitHub Profile
@jhmaster2000
jhmaster2000 / unicodedata2json.js
Created September 18, 2021 16:29
UnicodeData.txt to JSON converter
// Script runs on the browser console of the webpage: http://unicode.org/Public/UNIDATA/UnicodeData.txt
const entries = document.querySelector("body > pre").innerText.split('\n');
entries.pop();
let decompTags = ['<font>','<noBreak>','<initial>','<medial>','<final>','<isolated>','<circle>','<super>','<sub>','<vertical>','<wide>','<narrow>','<small>','<square>','<fraction>','<compat>']
function parseDecompMapping(mapping) {
if (!mapping) return null;
mapping = mapping.split(' ');