stringlang
Data and utilities for identifying characters by unicode block
Installation
npm i @broofa/stringlang
import {unicodeBlock, unicodeBlockCount, BLOCKS} from 'stringlang';
unicodeBlock()
Get block of a given character or code point.
Note: Runs at 10M+ chars/second on a modern Mac laptop (test data)
unicodeBlock(30028);
unicodeBlock('界');
unicodeBlock('Aα界', 2);
unicodeBlockCount()
Count characters by block
unicodeBlockCount('Hello World or Καλημέρα κόσμε or こんにちは 世界');
BLOCKS
Array of [block name, min code point, max code point] entries, ordered by code
point.
BLOCKS;