Package: alphanumeric - uhop/console-toolkit GitHub Wiki

The alphanumeric package provides utilities for working with numbers, letters and symbols used to improve user experience in the console.

  • Utilities:
    • Converting to Roman numbers: alphanumeric/roman.js.
    • Number formatters/humanizers: alphanumeric/number-formatters.js.
    • Special Unicode symbols for well-known fractions: alphanumeric/fractions.js.
    • Transcoding utilities: alphanumeric/utils.js.
  • Special symbols:
    • Arrows: alphanumeric/arrows.js.
    • Decorative symbols for Latin letters: alphanumeric/unicode-letters.js.
    • Decorative symbols for numbers: alphanumeric/unicode-numbers.js.
    • Alternative symbols for numbers: alphanumeric/unicode-cultural-numbers.js.

alphanumeric/arrows.js

The alphanumeric/arrows.js module provides constants for arrows and their Unicode symbols. See the file for more details.

Arrows are represented as a four-element array of Unicode symbols. THe module defines the following directional constants to access array elements:

Name Value
LEFT 0
UP 1
RIGHT 2
DOWN 3

This table was generated by scripts/arrows.js:

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ Name              โ”‚ Result  โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ dashed            โ”‚ โ‡  โ‡ก โ‡ข โ‡ฃ โ”‚
โ”‚ double            โ”‚ โ‡ โ‡‘ โ‡’ โ‡“ โ”‚
โ”‚ doubleWithStroke  โ”‚ โ‡   โ‡   โ”‚
โ”‚ fromBar           โ”‚ โ†ค โ†ฅ โ†ฆ โ†ง โ”‚
โ”‚ openHeaded        โ”‚ โ‡ฝ   โ‡พ   โ”‚
โ”‚ simple            โ”‚ โ† โ†‘ โ†’ โ†“ โ”‚
โ”‚ squiggle          โ”‚ โ‡œ   โ‡   โ”‚
โ”‚ toBar             โ”‚ โ‡ค   โ‡ฅ   โ”‚
โ”‚ triple            โ”‚ โ‡š   โ‡›   โ”‚
โ”‚ twoHeaded         โ”‚ โ†ž โ†Ÿ โ†  โ†ก โ”‚
โ”‚ wave              โ”‚ โ†œ   โ†   โ”‚
โ”‚ white             โ”‚ โ‡ฆ โ‡ง โ‡จ โ‡ฉ โ”‚
โ”‚ withBarbDown      โ”‚ โ†ฝ โ†ฟ โ‡€ โ‡‚ โ”‚
โ”‚ withBarbUp        โ”‚ โ†ผ โ†พ โ‡ โ‡ƒ โ”‚
โ”‚ withDoubleVStroke โ”‚ โ‡บ   โ‡ป   โ”‚
โ”‚ withLoop          โ”‚ โ†ซ   โ†ฌ   โ”‚
โ”‚ withStroke        โ”‚ โ†š   โ†›   โ”‚
โ”‚ withTail          โ”‚ โ†ข   โ†ฃ   โ”‚
โ”‚ withVStroke       โ”‚ โ‡ท   โ‡ธ   โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

alphanumeric/fractions.js

Unicode has special symbols to represent fractions: a half, thirds, quarters, fifths, sixths, eighths, etc. The alphanumeric/fractions.js module provides tables of such symbols and functions, that choose the appropriate symbol for the given fraction. See the file for more details.

Tables

Fractions are represented by an array of objects with the following properties:

  • numerator โ€” the numerator of the fraction.
  • denominator โ€” the denominator of the fraction.
  • symbol โ€” the symbol used to represent the fraction.
  • value โ€” the value of the fraction.

Example: {numerator: 1, denominator: 2, symbol: '\u00BD', value: 0.5}.

Available tables:

  • fractions โ€” the table of all fraction symbols.
  • thirds โ€” the table of all third symbols.
  • quarters โ€” the table of all quarter symbols. AKA fourths.
  • fifths โ€” the table of all fifth symbols.
  • sixths โ€” the table of all sixth symbols.
  • eighths โ€” the table of all eighth symbols.

Utilities

All utilities have the following signature: getXXX(fraction, useFractionForZero) and return a string:

  • fraction โ€” a number. Its fractional part will be replaced by the closest fraction symbol.
  • useFractionForZero โ€” if true, a fractional zero symbol will be used if available.
    • Example: a symbol representing 0/3 will be used if useFractionForZero is true.

The following utilities are available:

  • getFraction(fraction, useFractionForZero) โ€” uses the fractions table to find the symbol for the given fraction.
  • getThird(fraction, useFractionForZero) โ€” uses the thirds table.
  • getQuarter(fraction, useFractionForZero) โ€” uses the quarters table. AKA getFourth().
  • getFifth(fraction, useFractionForZero) โ€” uses the fifths table.
  • getSixth(fraction, useFractionForZero) โ€” uses the sixths table.
  • getEighth(fraction, useFractionForZero) โ€” uses the eighths table.

Example

This table was generated by scripts/fractions.js:

Available fraction symbols

fractions: โ†‰ โ…’ โ…‘ โ…› โ… โ…™ โ…• ยผ โ…“ โ…œ โ…– ยฝ โ…— โ… โ…” ยพ โ…˜ โ…š โ…ž
thirds:    โ†‰ โ…“ โ…”
quarters:  0 ยผ ยฝ ยพ
fifths:    0 โ…• โ…– โ…— โ…˜
sixths:    โ†‰ โ…™ โ…“ ยฝ โ…” โ…š
eighths:   0 โ…› ยผ โ…œ ยฝ โ… ยพ โ…ž

Mapping fractions to symbols

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚       โ”‚                      Chosen symbols                       โ”‚
โ”‚ Value โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚       โ”‚ Thirds โ”‚ Quarters โ”‚ Fifths โ”‚ Sixths โ”‚ Eighths โ”‚ Fractions โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 1.00  โ”‚   1    โ”‚    1     โ”‚   1    โ”‚   1    โ”‚    1    โ”‚     1     โ”‚
โ”‚ 1.05  โ”‚   1    โ”‚    1     โ”‚   1    โ”‚   1    โ”‚    1    โ”‚    1โ…’     โ”‚
โ”‚ 1.10  โ”‚   1    โ”‚    1     โ”‚   1โ…•   โ”‚   1โ…™   โ”‚   1โ…›    โ”‚    1โ…’     โ”‚
โ”‚ 1.15  โ”‚   1    โ”‚    1ยผ    โ”‚   1โ…•   โ”‚   1โ…™   โ”‚   1โ…›    โ”‚    1โ…     โ”‚
โ”‚ 1.20  โ”‚   1โ…“   โ”‚    1ยผ    โ”‚   1โ…•   โ”‚   1โ…™   โ”‚   1ยผ    โ”‚    1โ…•     โ”‚
โ”‚ 1.25  โ”‚   1โ…“   โ”‚    1ยผ    โ”‚   1โ…•   โ”‚   1โ…“   โ”‚   1ยผ    โ”‚    1ยผ     โ”‚
โ”‚ 1.30  โ”‚   1โ…“   โ”‚    1ยผ    โ”‚   1โ…–   โ”‚   1โ…“   โ”‚   1ยผ    โ”‚    1โ…“     โ”‚
โ”‚ 1.35  โ”‚   1โ…“   โ”‚    1ยผ    โ”‚   1โ…–   โ”‚   1โ…“   โ”‚   1โ…œ    โ”‚    1โ…“     โ”‚
โ”‚ 1.40  โ”‚   1โ…“   โ”‚    1ยฝ    โ”‚   1โ…–   โ”‚   1โ…“   โ”‚   1โ…œ    โ”‚    1โ…–     โ”‚
โ”‚ 1.45  โ”‚   1โ…“   โ”‚    1ยฝ    โ”‚   1โ…–   โ”‚   1ยฝ   โ”‚   1ยฝ    โ”‚    1โ…–     โ”‚
โ”‚ 1.50  โ”‚   1โ…”   โ”‚    1ยฝ    โ”‚   1โ…–   โ”‚   1ยฝ   โ”‚   1ยฝ    โ”‚    1ยฝ     โ”‚
โ”‚ 1.55  โ”‚   1โ…”   โ”‚    1ยฝ    โ”‚   1โ…—   โ”‚   1ยฝ   โ”‚   1ยฝ    โ”‚    1โ…—     โ”‚
โ”‚ 1.60  โ”‚   1โ…”   โ”‚    1ยฝ    โ”‚   1โ…—   โ”‚   1โ…”   โ”‚   1โ…    โ”‚    1โ…—     โ”‚
โ”‚ 1.65  โ”‚   1โ…”   โ”‚    1ยพ    โ”‚   1โ…—   โ”‚   1โ…”   โ”‚   1โ…    โ”‚    1โ…”     โ”‚
โ”‚ 1.70  โ”‚   1โ…”   โ”‚    1ยพ    โ”‚   1โ…˜   โ”‚   1โ…”   โ”‚   1ยพ    โ”‚    1โ…”     โ”‚
โ”‚ 1.75  โ”‚   1โ…”   โ”‚    1ยพ    โ”‚   1โ…˜   โ”‚   1โ…”   โ”‚   1ยพ    โ”‚    1ยพ     โ”‚
โ”‚ 1.80  โ”‚   1โ…”   โ”‚    1ยพ    โ”‚   1โ…˜   โ”‚   1โ…š   โ”‚   1ยพ    โ”‚    1โ…˜     โ”‚
โ”‚ 1.85  โ”‚   2    โ”‚    1ยพ    โ”‚   1โ…˜   โ”‚   1โ…š   โ”‚   1โ…ž    โ”‚    1โ…š     โ”‚
โ”‚ 1.90  โ”‚   2    โ”‚    2     โ”‚   1โ…˜   โ”‚   1โ…š   โ”‚   1โ…ž    โ”‚    1โ…ž     โ”‚
โ”‚ 1.95  โ”‚   2    โ”‚    2     โ”‚   2    โ”‚   2    โ”‚    2    โ”‚     2     โ”‚
โ”‚ 2.00  โ”‚   2    โ”‚    2     โ”‚   2    โ”‚   2    โ”‚    2    โ”‚     2     โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

alphanumeric/number-formatters.js

The alphanumeric/number-formatters.js module provides functions to format numbers. See the file for more details.

The following utilities are available:

  • formatTime() โ€” format time values. It selects a time unit.
  • prepareTimeFormat() โ€” prepare time format for formatTime().
  • formatInteger() โ€” format integer values. It adds thousands separators.
  • formatNumber() โ€” format floating point values. It adds thousands separators and adds decimals if necessary.
  • abbrNumber() โ€” abbreviate numbers. It uses standard number units: k for thousands, M for millions, and G for billions, etc.
  • simplifyExponent() โ€” simplify exponential notation. It removes unnecessary zeros after the decimal point.
  • compareDifference() โ€” compare two numbers and return a humanized difference in percentage, as a ratio, etc.

Function prepareTimeFormat()

prepareTimeFormat(values, scale = 1, useUnicode = false) prepares time format for formatTime(). It takes an array of time values and finds a common time format so they can be directly comparable.

The following parameters are supported:

  • values โ€” an array of time values.
  • scale โ€” the initial scale factor. Defaults to 1 (seconds).
    • Date.now() returns the number of milliseconds. In this case the scale should be set to 1000.
  • useUnicode โ€” if true, special Unicode unit symbols will be used. Otherwise, ASCII unit names will be used. Defaults to false.

It returns an object with the following properties:

  • scale โ€” the common scale factor.
  • precision โ€” the number of digits after the decimal point.
  • unit โ€” the time unit as a string.

Example

import {prepareTimeFormat} from 'console-toolkit/alphanumeric/number-formatters.js';

const fmt1 = prepareTimeFormat([0.000002, 0.000005, 0.000020]);
// {scale: 1000000, precision: 1, unit: 'ฮผs'}

const fmt2 = prepareTimeFormat([2, 5, 20], 1000, true);
// {scale: 1, precision: 1, unit: 'ใŽณ'}

Function formatTime()

formatTime(value, format) formats a time value returning a string:

  • value โ€” the time value.
  • format โ€” the time format. See prepareTimeFormat() for details.
    • It implements additional properties:
      • keepFractionAsIs โ€” keeps fractional part as is if true. Otherwise, it removes trailing zeros and, if warranted, the decimal point. Defaults to false.

The definition of the function explains how format is used the best:

const formatTime = (value, format) => {
  let result = (value * format.scale).toFixed(format.precision);
  if (format.precision > 0 && !format.keepFractionAsIs)
    result = result.replace(/\.0+$/, '');
  return result + format.unit;
};

Example

import {formatTime, prepareTimeFormat} from 'console-toolkit/alphanumeric/number-formatters.js';

const fmt = prepareTimeFormat([2, 3, 20], 1000);

console.log(formatTime(20, fmt)); // 20ms

Function formatInteger()

formatInteger(value, options) formats an integer value returning a string:

  • value โ€” the integer value.
  • options โ€” an object with the following properties:
    • keepSign โ€” forces + sign for positive numbers if true. Defaults to false.
    • comma โ€” a thousand separator. Defaults to ','.

Example

import {formatInteger} from 'console-toolkit/alphanumeric/number-formatters.js';

console.log(formatInteger(123456789)); // 123,456,789

Function formatNumber()

formatNumber(value, options) formats a real number value using a fixed-point notation returning a string:

  • value โ€” the real number value.
  • options โ€” an object with the following properties:
    • decimals โ€” the number of decimals. Defaults to 0.
    • keepSign โ€” forces + sign for positive numbers if true. Defaults to false.
    • keepFractionAsIs โ€” keeps fractional part as is if true. Otherwise, it removes trailing zeros and, if warranted, the decimal point. Defaults to false.
    • dot โ€” the decimal point symbol. Defaults to ..
    • comma โ€” a thousand separator. Defaults to ','.

The integer part of a number is formatted using formatInteger() with the same options.

Example

import {formatNumber} from 'console-toolkit/alphanumeric/number-formatters.js';

console.log(formatNumber(1234.78956, {decimals: 3})); // 1,234.79
console.log(formatNumber(1234.78956, {
  decimals: 3, keepFractionAsIs: true})); // 1,234.790

Function abbrNumber()

abbrNumber(value, options) abbreviates a number using standard notation of k, M, G, or T returning a string:

  • value โ€” the number value.
  • options โ€” an object with the following properties:
    • decimals โ€” the number of decimals. Defaults to 0.
    • keepSign โ€” forces + sign for positive numbers if true. Defaults to false.
    • keepFractionAsIs โ€” keeps fractional part as is if true. Otherwise, it removes trailing zeros and, if warranted, the decimal point. Defaults to false.
    • dot โ€” the decimal point symbol. Defaults to ..
    • comma โ€” a thousand separator. Defaults to ','.

Example

import {abbrNumber} from 'console-toolkit/alphanumeric/number-formatters.js';

console.log(abbrNumber(123));        // 123
console.log(abbrNumber(1234));       // 1,234
console.log(abbrNumber(12345));      // 12k
console.log(abbrNumber(123456));     // 123k
console.log(abbrNumber(1234567));    // 1M
console.log(abbrNumber(12345678));   // 12M
console.log(abbrNumber(123456789));  // 123M
console.log(abbrNumber(1234567890)); // 1G

console.log(abbrNumber(123, {decimals: 1}));        // 123
console.log(abbrNumber(1234, {decimals: 1}));       // 1,234
console.log(abbrNumber(12345, {decimals: 1}));      // 12.3k
console.log(abbrNumber(123456, {decimals: 1}));     // 123.5k
console.log(abbrNumber(1234567, {decimals: 1}));    // 1.2M
console.log(abbrNumber(12345678, {decimals: 1}));   // 12.3M
console.log(abbrNumber(123456789, {decimals: 1}));  // 123.5M
console.log(abbrNumber(1234567890, {decimals: 1})); // 1.2G

Function simplifyExponent()

simplifyExponent(value, options) simplifies an exponent by removing trailing zeros in the fractional part and removing a plus sign in the exponent returning the result as a string:

  • value โ€” a number value or a string representing a number in an exponent notation.
  • options โ€” an object with the following properties:
    • keepExpPlus โ€” forces + sign for positive exponents if true. Defaults to false.

Example

import {simplifyExponent} from 'console-toolkit/alphanumeric/number-formatters.js';

console.log((2e99).toExponential(3));                   // 2.000e+99
console.log(simplifyExponent((2e99).toExponential(3))); // 2e99
console.log(
  simplifyExponent((2e99).toExponential(3), {keepExpPlus: true}})); // 2e+99

Function compareDifference()

compareDifference(a, b) compares two numbers in a "human" way. It returns an object with the following properties:

  • less โ€” true if a is smaller than b.
  • Other properties are mutually exclusive:
    • infinity โ€” true if the smaller number is infinitely smaller than the bigger number.
    • equality โ€” true if the numbers are equal within 0.00001%.
    • percentage โ€” the difference in percentage formatted using formatNumber().
    • ratio โ€” the difference in ratio formatted using formatNumber().

percentage is calculated as 100 * Math.abs(b - a) / a.

ratio is calculated as b / a, where a is the smaller number.

Example

import {compareDifference} from 'console-toolkit/alphanumeric/number-formatters.js';

const announce = result => {
  if (result.equality) return 'equal to';
  if (result.infinity) return `infinitely ${result.less ? 'smaller' : 'bigger'} than`;
  if (result.percentage) return `${result.percentage}% ${result.less ? 'smaller' : 'bigger'} than`;
  if (result.ratio) return `${result.ratio}x ${result.less ? 'smaller' : 'bigger'} than`;
  return 'cannot be compared';
};

const cmp = (a, b) => {
  const result = compareDifference(a, b);
  console.log(a, 'is', announce(result), b);
};

cmp(98, 130); // 98 is 32.7% smaller than 130
cmp(198, 15); // 198 is 13.2x bigger than 15

alphanumeric/roman.js

The alphanumeric/roman.js module provides utilities to convert integers to Roman numbers. See the file for more details.

The utilities work with integer numbers from 1 to 3,999.

Function toRoman()

toRoman(value) converts an integer number to a Roman number string using uppercase letters.

Example

import {toRoman} from 'console-toolkit/alphanumeric/roman.js';

console.log(toRoman(1));     // I
console.log(toRoman(2));     // II
console.log(toRoman(3));     // III
console.log(toRoman(4));     // IV
console.log(toRoman(5));     // V

console.log(toRoman(1776));  // MDCCLXXVI
console.log(toRoman(2000));  // MM
console.log(toRoman(2024));  // MMXXIV

Function toRomanUnicode()

toRomanUnicode(value) converts an integer number to a Roman number string using uppercase Unicode characters.

Example

import {toRomanUnicode} from 'console-toolkit/alphanumeric/roman.js';

console.log(toRomanUnicode(1));     // โ… 
console.log(toRomanUnicode(2));     // โ…ก
console.log(toRomanUnicode(3));     // โ…ข
console.log(toRomanUnicode(4));     // โ…ฃ
console.log(toRomanUnicode(5));     // โ…ค

console.log(toRomanUnicode(1776));  // โ…ฏโ…ฎโ…ญโ…ญโ…ฌโ…ฉโ…ฉโ…ฅ
console.log(toRomanUnicode(2000));  // โ…ฏโ…ฏ
console.log(toRomanUnicode(2024));  // โ…ฏโ…ฏโ…ฉโ…ฉโ…ฃ

Function toRomanLowerUnicode()

toRomanLowerUnicode(value) converts an integer number to a Roman number string using lowercase Unicode characters.

alphanumeric/unicode-letters.js

The alphanumeric/unicode-letters.js module provide tables of Unicode symbols for variously decorated Latin characters. See the file for more details.

Function transcode()

transcode(text, table, options) transcodes the text using the specified table returning a new string:

  • text โ€” the text to be transcoded.
  • table โ€” the table to be used for transcoding. It can be a name of a table, which is defined in this module, as a string, or a table object itself.
  • options โ€” an object with the following properties:
    • missing โ€” if specified it will be a character to be used in place of characters in the text that are not found in the table. Otherwise, a character is left as is.

Tables

The module defines many tables. The following sample table was generated by scripts/letters.js (the output depends on symbols available in the system, run the utility yourself to see the exact result):

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ Name                โ”‚ Result                     โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ pattern             โ”‚ ABCDEFGHIJKLMNOPQRSTUVWXYZ โ”‚
โ”‚                     โ”‚ abcdefghijklmnopqrstuvwxyz โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ bold                โ”‚ ๐€๐๐‚๐ƒ๐„๐…๐†๐‡๐ˆ๐‰๐Š๐‹๐Œ๐๐Ž๐๐๐‘๐’๐“๐”๐•๐–๐—๐˜๐™ โ”‚
โ”‚                     โ”‚ ๐š๐›๐œ๐๐ž๐Ÿ๐ ๐ก๐ข๐ฃ๐ค๐ฅ๐ฆ๐ง๐จ๐ฉ๐ช๐ซ๐ฌ๐ญ๐ฎ๐ฏ๐ฐ๐ฑ๐ฒ๐ณ โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ italic              โ”‚ ๐ด๐ต๐ถ๐ท๐ธ๐น๐บ๐ป๐ผ๐ฝ๐พ๐ฟ๐‘€๐‘๐‘‚๐‘ƒ๐‘„๐‘…๐‘†๐‘‡๐‘ˆ๐‘‰๐‘Š๐‘‹๐‘Œ๐‘ โ”‚
โ”‚                     โ”‚ ๐‘Ž๐‘๐‘๐‘‘๐‘’๐‘“๐‘”โ„Ž๐‘–๐‘—๐‘˜๐‘™๐‘š๐‘›๐‘œ๐‘๐‘ž๐‘Ÿ๐‘ ๐‘ก๐‘ข๐‘ฃ๐‘ค๐‘ฅ๐‘ฆ๐‘ง โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ boldItalic          โ”‚ ๐‘จ๐‘ฉ๐‘ช๐‘ซ๐‘ฌ๐‘ญ๐‘ฎ๐‘ฏ๐‘ฐ๐‘ฑ๐‘ฒ๐‘ณ๐‘ด๐‘ต๐‘ถ๐‘ท๐‘ธ๐‘น๐‘บ๐‘ป๐‘ผ๐‘ฝ๐‘พ๐‘ฟ๐’€๐’ โ”‚
โ”‚                     โ”‚ ๐’‚๐’ƒ๐’„๐’…๐’†๐’‡๐’ˆ๐’‰๐’Š๐’‹๐’Œ๐’๐’Ž๐’๐’๐’‘๐’’๐’“๐’”๐’•๐’–๐’—๐’˜๐’™๐’š๐’› โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ sansSerif           โ”‚ ๐– ๐–ก๐–ข๐–ฃ๐–ค๐–ฅ๐–ฆ๐–ง๐–จ๐–ฉ๐–ช๐–ซ๐–ฌ๐–ญ๐–ฎ๐–ฏ๐–ฐ๐–ฑ๐–ฒ๐–ณ๐–ด๐–ต๐–ถ๐–ท๐–ธ๐–น โ”‚
โ”‚                     โ”‚ ๐–บ๐–ป๐–ผ๐–ฝ๐–พ๐–ฟ๐—€๐—๐—‚๐—ƒ๐—„๐—…๐—†๐—‡๐—ˆ๐—‰๐—Š๐—‹๐—Œ๐—๐—Ž๐—๐—๐—‘๐—’๐—“ โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ sansSerifBold       โ”‚ ๐—”๐—•๐—–๐——๐—˜๐—™๐—š๐—›๐—œ๐—๐—ž๐—Ÿ๐— ๐—ก๐—ข๐—ฃ๐—ค๐—ฅ๐—ฆ๐—ง๐—จ๐—ฉ๐—ช๐—ซ๐—ฌ๐—ญ โ”‚
โ”‚                     โ”‚ ๐—ฎ๐—ฏ๐—ฐ๐—ฑ๐—ฒ๐—ณ๐—ด๐—ต๐—ถ๐—ท๐—ธ๐—น๐—บ๐—ป๐—ผ๐—ฝ๐—พ๐—ฟ๐˜€๐˜๐˜‚๐˜ƒ๐˜„๐˜…๐˜†๐˜‡ โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ sansSerifItalic     โ”‚ ๐˜ˆ๐˜‰๐˜Š๐˜‹๐˜Œ๐˜๐˜Ž๐˜๐˜๐˜‘๐˜’๐˜“๐˜”๐˜•๐˜–๐˜—๐˜˜๐˜™๐˜š๐˜›๐˜œ๐˜๐˜ž๐˜Ÿ๐˜ ๐˜ก โ”‚
โ”‚                     โ”‚ ๐˜ข๐˜ฃ๐˜ค๐˜ฅ๐˜ฆ๐˜ง๐˜จ๐˜ฉ๐˜ช๐˜ซ๐˜ฌ๐˜ญ๐˜ฎ๐˜ฏ๐˜ฐ๐˜ฑ๐˜ฒ๐˜ณ๐˜ด๐˜ต๐˜ถ๐˜ท๐˜ธ๐˜น๐˜บ๐˜ป โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ sansSerifBoldItalic โ”‚ ๐˜ผ๐˜ฝ๐˜พ๐˜ฟ๐™€๐™๐™‚๐™ƒ๐™„๐™…๐™†๐™‡๐™ˆ๐™‰๐™Š๐™‹๐™Œ๐™๐™Ž๐™๐™๐™‘๐™’๐™“๐™”๐™• โ”‚
โ”‚                     โ”‚ ๐™–๐™—๐™˜๐™™๐™š๐™›๐™œ๐™๐™ž๐™Ÿ๐™ ๐™ก๐™ข๐™ฃ๐™ค๐™ฅ๐™ฆ๐™ง๐™จ๐™ฉ๐™ช๐™ซ๐™ฌ๐™ญ๐™ฎ๐™ฏ โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ script              โ”‚ ๐’œโ„ฌ๐’ž๐’Ÿโ„ฐโ„ฑ๐’ขโ„‹โ„๐’ฅ๐’ฆโ„’โ„ณ๐’ฉ๐’ช๐’ซ๐’ฌโ„›๐’ฎ๐’ฏ๐’ฐ๐’ฑ๐’ฒ๐’ณ๐’ด๐’ต โ”‚
โ”‚                     โ”‚ ๐’ถ๐’ท๐’ธ๐’นโ„ฏ๐’ปโ„Š๐’ฝ๐’พ๐’ฟ๐“€๐“๐“‚๐“ƒโ„ด๐“…๐“†๐“‡๐“ˆ๐“‰๐“Š๐“‹๐“Œ๐“๐“Ž๐“ โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ scriptBold          โ”‚ ๐“๐“‘๐“’๐““๐“”๐“•๐“–๐“—๐“˜๐“™๐“š๐“›๐“œ๐“๐“ž๐“Ÿ๐“ ๐“ก๐“ข๐“ฃ๐“ค๐“ฅ๐“ฆ๐“ง๐“จ๐“ฉ โ”‚
โ”‚                     โ”‚ ๐“ช๐“ซ๐“ฌ๐“ญ๐“ฎ๐“ฏ๐“ฐ๐“ฑ๐“ฒ๐“ณ๐“ด๐“ต๐“ถ๐“ท๐“ธ๐“น๐“บ๐“ป๐“ผ๐“ฝ๐“พ๐“ฟ๐”€๐”๐”‚๐”ƒ โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ fraktur             โ”‚ ๐”„๐”…โ„ญ๐”‡๐”ˆ๐”‰๐”Šโ„Œโ„‘๐”๐”Ž๐”๐”๐”‘๐”’๐”“๐””โ„œ๐”–๐”—๐”˜๐”™๐”š๐”›๐”œโ„จ โ”‚
โ”‚                     โ”‚ ๐”ž๐”Ÿ๐” ๐”ก๐”ข๐”ฃ๐”ค๐”ฅ๐”ฆ๐”ง๐”จ๐”ฉ๐”ช๐”ซ๐”ฌ๐”ญ๐”ฎ๐”ฏ๐”ฐ๐”ฑ๐”ฒ๐”ณ๐”ด๐”ต๐”ถ๐”ท โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ frakturBold         โ”‚ ๐•ฌ๐•ญ๐•ฎ๐•ฏ๐•ฐ๐•ฑ๐•ฒ๐•ณ๐•ด๐•ต๐•ถ๐•ท๐•ธ๐•น๐•บ๐•ป๐•ผ๐•ฝ๐•พ๐•ฟ๐–€๐–๐–‚๐–ƒ๐–„๐–… โ”‚
โ”‚                     โ”‚ ๐–†๐–‡๐–ˆ๐–‰๐–Š๐–‹๐–Œ๐–๐–Ž๐–๐–๐–‘๐–’๐–“๐–”๐–•๐––๐–—๐–˜๐–™๐–š๐–›๐–œ๐–๐–ž๐–Ÿ โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ mono                โ”‚ ๐™ฐ๐™ฑ๐™ฒ๐™ณ๐™ด๐™ต๐™ถ๐™ท๐™ธ๐™น๐™บ๐™ป๐™ผ๐™ฝ๐™พ๐™ฟ๐š€๐š๐š‚๐šƒ๐š„๐š…๐š†๐š‡๐šˆ๐š‰ โ”‚
โ”‚                     โ”‚ ๐šŠ๐š‹๐šŒ๐š๐šŽ๐š๐š๐š‘๐š’๐š“๐š”๐š•๐š–๐š—๐š˜๐š™๐šš๐š›๐šœ๐š๐šž๐šŸ๐š ๐šก๐šข๐šฃ โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ doubleStruck        โ”‚ ๐”ธ๐”นโ„‚๐”ป๐”ผ๐”ฝ๐”พโ„๐•€๐•๐•‚๐•ƒ๐•„โ„•๐•†โ„™โ„šโ„๐•Š๐•‹๐•Œ๐•๐•Ž๐•๐•โ„ค โ”‚
โ”‚                     โ”‚ ๐•’๐•“๐•”๐••๐•–๐•—๐•˜๐•™๐•š๐•›๐•œ๐•๐•ž๐•Ÿ๐• ๐•ก๐•ข๐•ฃ๐•ค๐•ฅ๐•ฆ๐•ง๐•จ๐•ฉ๐•ช๐•ซ โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ parens              โ”‚ ๐Ÿ„๐Ÿ„‘๐Ÿ„’๐Ÿ„“๐Ÿ„”๐Ÿ„•๐Ÿ„–๐Ÿ„—๐Ÿ„˜๐Ÿ„™๐Ÿ„š๐Ÿ„›๐Ÿ„œ๐Ÿ„๐Ÿ„ž๐Ÿ„Ÿ๐Ÿ„ ๐Ÿ„ก๐Ÿ„ข๐Ÿ„ฃ๐Ÿ„ค๐Ÿ„ฅ๐Ÿ„ฆ๐Ÿ„ง๐Ÿ„จ๐Ÿ„ฉ โ”‚
โ”‚                     โ”‚ โ’œโ’โ’žโ’Ÿโ’ โ’กโ’ขโ’ฃโ’คโ’ฅโ’ฆโ’งโ’จโ’ฉโ’ชโ’ซโ’ฌโ’ญโ’ฎโ’ฏโ’ฐโ’ฑโ’ฒโ’ณโ’ดโ’ต โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ circled             โ”‚ โ’ถโ’ทโ’ธโ’นโ’บโ’ปโ’ผโ’ฝโ’พโ’ฟโ“€โ“โ“‚โ“ƒโ“„โ“…โ“†โ“‡โ“ˆโ“‰โ“Šโ“‹โ“Œโ“โ“Žโ“ โ”‚
โ”‚                     โ”‚ โ“โ“‘โ“’โ““โ“”โ“•โ“–โ“—โ“˜โ“™โ“šโ“›โ“œโ“โ“žโ“Ÿโ“ โ“กโ“ขโ“ฃโ“คโ“ฅโ“ฆโ“งโ“จโ“ฉ โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ squared             โ”‚ ๐Ÿ„ฐ๐Ÿ„ฑ๐Ÿ„ฒ๐Ÿ„ณ๐Ÿ„ด๐Ÿ„ต๐Ÿ„ถ๐Ÿ„ท๐Ÿ„ธ๐Ÿ„น๐Ÿ„บ๐Ÿ„ป๐Ÿ„ผ๐Ÿ„ฝ๐Ÿ„พ๐Ÿ„ฟ๐Ÿ…€๐Ÿ…๐Ÿ…‚๐Ÿ…ƒ๐Ÿ…„๐Ÿ……๐Ÿ…†๐Ÿ…‡๐Ÿ…ˆ๐Ÿ…‰ โ”‚
โ”‚                     โ”‚ abcdefghijklmnopqrstuvwxyz โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ negativeCircled     โ”‚ ๐Ÿ…๐Ÿ…‘๐Ÿ…’๐Ÿ…“๐Ÿ…”๐Ÿ…•๐Ÿ…–๐Ÿ…—๐Ÿ…˜๐Ÿ…™๐Ÿ…š๐Ÿ…›๐Ÿ…œ๐Ÿ…๐Ÿ…ž๐Ÿ…Ÿ๐Ÿ… ๐Ÿ…ก๐Ÿ…ข๐Ÿ…ฃ๐Ÿ…ค๐Ÿ…ฅ๐Ÿ…ฆ๐Ÿ…ง๐Ÿ…จ๐Ÿ…ฉ โ”‚
โ”‚                     โ”‚ abcdefghijklmnopqrstuvwxyz โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ negativeSquared     โ”‚ ๐Ÿ…ฐ๐Ÿ…ฑ๐Ÿ…ฒ๐Ÿ…ณ๐Ÿ…ด๐Ÿ…ต๐Ÿ…ถ๐Ÿ…ท๐Ÿ…ธ๐Ÿ…น๐Ÿ…บ๐Ÿ…ป๐Ÿ…ผ๐Ÿ…ฝ๐Ÿ…พ๐Ÿ…ฟ๐Ÿ†€๐Ÿ†๐Ÿ†‚๐Ÿ†ƒ๐Ÿ†„๐Ÿ†…๐Ÿ††๐Ÿ†‡๐Ÿ†ˆ๐Ÿ†‰ โ”‚
โ”‚                     โ”‚ abcdefghijklmnopqrstuvwxyz โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ regionalIndicators  โ”‚ ๐Ÿ‡ฆ๐Ÿ‡ง๐Ÿ‡จ๐Ÿ‡ฉ๐Ÿ‡ช๐Ÿ‡ซ๐Ÿ‡ฌ๐Ÿ‡ญ๐Ÿ‡ฎ๐Ÿ‡ฏ๐Ÿ‡ฐ๐Ÿ‡ฑ๐Ÿ‡ฒ๐Ÿ‡ณ๐Ÿ‡ด๐Ÿ‡ต๐Ÿ‡ถ๐Ÿ‡ท๐Ÿ‡ธ๐Ÿ‡น๐Ÿ‡บ๐Ÿ‡ป๐Ÿ‡ผ๐Ÿ‡ฝ๐Ÿ‡พ๐Ÿ‡ฟ โ”‚
โ”‚                     โ”‚ abcdefghijklmnopqrstuvwxyz โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

The tables are exposed as the transcodeTables object. Its keys are names of tables and values are table objects.

alphanumeric/unicode-numbers.js

The alphanumeric/unicode-numbers.js module provides tables of Unicode symbols for numbers. It is used mostly to decorate numbers, e.g., as list numbers or to enumerate headers. See the file for more details.

The module is structured similar to alphanumeric/unicode-letters.js described above. It defined the transcode() function and the transcodeTables object. Additionally, it defines two more functions: numberExponent() and numberPunctuation().

Function numberExponent()

numberExponent(value, options) converts a number to a string with an exponent notation:

  • value โ€” number with an exponent represented as a string.
  • options โ€” an object with the following properties:
    • useSpecialMinus โ€” if true, use a special math minus symbol instead of the dash.

Example

import {numberExponent} from 'console-toolkit/src/alphanumeric/unicode-numbers.js';

console.log(1e9);                                    // 1000000000
console.log(1e9.toExponential());                    // 1e+9
console.log(numberExponent((-1e9).toExponential())); // -1ร—10โบโน
console.log(numberExponent((-1e9).toExponential(),
  {useSpecialMinus: true}));                         // โˆ’1ร—10โบโน

Function numberPunctuation()

numberPunctuation(value, options) converts a number to a string with a punctuation notation:

  • value โ€” number with a punctuation represented as a string. It can be a result of formatNumber() or formatInteger() described above.
  • options โ€” an object with the following properties:
    • addBefore โ€” string to add before a digit. Defaults to the empty string ('').
    • addAfter โ€” string to add after a digit. Defaults to the space (' ').

Example

import {numberPunctuation} from 'console-toolkit/src/alphanumeric/unicode-numbers.js';

console.log('1,234.567'); // ๐Ÿ„‚ 23โ’‹ 567

Tables

The modules defines many transcoding tables. The following table was generated by scripts/numbers.js:

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ Name                             โ”‚ Result              โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ pattern                          โ”‚ 0 1 2 3 4 5 6 7 8 9 โ”‚
โ”‚ circled                          โ”‚ โ“ช โ‘  โ‘ก โ‘ข โ‘ฃ โ‘ค โ‘ฅ โ‘ฆ โ‘ง โ‘จ โ”‚
โ”‚ parens                           โ”‚ 0 โ‘ด โ‘ต โ‘ถ โ‘ท โ‘ธ โ‘น โ‘บ โ‘ป โ‘ผ โ”‚
โ”‚ dots                             โ”‚ ๐Ÿ„€ โ’ˆ โ’‰ โ’Š โ’‹ โ’Œ โ’ โ’Ž โ’ โ’ โ”‚
โ”‚ doubleCircled                    โ”‚ 0 โ“ต โ“ถ โ“ท โ“ธ โ“น โ“บ โ“ป โ“ผ โ“ฝ โ”‚
โ”‚ bold                             โ”‚ ๐ŸŽ ๐Ÿ ๐Ÿ ๐Ÿ‘ ๐Ÿ’ ๐Ÿ“ ๐Ÿ” ๐Ÿ• ๐Ÿ– ๐Ÿ— โ”‚
โ”‚ doubleStruck                     โ”‚ ๐Ÿ˜ ๐Ÿ™ ๐Ÿš ๐Ÿ› ๐Ÿœ ๐Ÿ ๐Ÿž ๐ŸŸ ๐Ÿ  ๐Ÿก โ”‚
โ”‚ sansSerif                        โ”‚ ๐Ÿข ๐Ÿฃ ๐Ÿค ๐Ÿฅ ๐Ÿฆ ๐Ÿง ๐Ÿจ ๐Ÿฉ ๐Ÿช ๐Ÿซ โ”‚
โ”‚ sansSerifBold                    โ”‚ ๐Ÿฌ ๐Ÿญ ๐Ÿฎ ๐Ÿฏ ๐Ÿฐ ๐Ÿฑ ๐Ÿฒ ๐Ÿณ ๐Ÿด ๐Ÿต โ”‚
โ”‚ mono                             โ”‚ ๐Ÿถ ๐Ÿท ๐Ÿธ ๐Ÿน ๐Ÿบ ๐Ÿป ๐Ÿผ ๐Ÿฝ ๐Ÿพ ๐Ÿฟ โ”‚
โ”‚ commas                           โ”‚ ๐Ÿ„ ๐Ÿ„‚ ๐Ÿ„ƒ ๐Ÿ„„ ๐Ÿ„… ๐Ÿ„† ๐Ÿ„‡ ๐Ÿ„ˆ ๐Ÿ„‰ ๐Ÿ„Š โ”‚
โ”‚ roman                            โ”‚ 0 โ…  โ…ก โ…ข โ…ฃ โ…ค โ…ฅ โ…ฆ โ…ง โ…จ โ”‚
โ”‚ romanLower                       โ”‚ 0 โ…ฐ โ…ฑ โ…ฒ โ…ณ โ…ด โ…ต โ…ถ โ…ท โ…ธ โ”‚
โ”‚ dingbatsCircledSansSerif         โ”‚ 0 โž€ โž โž‚ โžƒ โž„ โž… โž† โž‡ โžˆ โ”‚
โ”‚ dingbatsNegativeCircled          โ”‚ โ“ฟ โถ โท โธ โน โบ โป โผ โฝ โพ โ”‚
โ”‚ dingbatsNegativeCircledSansSerif โ”‚ 0 โžŠ โž‹ โžŒ โž โžŽ โž โž โž‘ โž’ โ”‚
โ”‚ superscript                      โ”‚ โฐ ยน ยฒ ยณ โด โต โถ โท โธ โน โ”‚
โ”‚ subscript                        โ”‚ โ‚€ โ‚ โ‚‚ โ‚ƒ โ‚„ โ‚… โ‚† โ‚‡ โ‚ˆ โ‚‰ โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

alphanumeric/unicode-cultural-numbers.js

The alphanumeric/unicode-cultural-numbers.js module provides tables of Unicode symbols for numbers of different cultures. See the file for more details.

It exports the transcodeTables object.

alphanumeric/utils.js

The alphanumeric/utils.js module provides utility functions used by the alphanumeric package to define transcode tables. See the file for more details.

Class SymbolRange

The SymbolRange class represents a range of symbols.

Name Returns Description
SymbolRange(fromSymbol, from = 0, to = 9, inputBase = '0') SymbolRange Creates a new SymbolRange object.
from number The starting value of the range.
to number The ending value of the range.
base number The offset from the starting value to the code point of fromSymbol.
inputBase number The starting code point of the range.
overlay object or null The other SymbolRange object or a transcoding table.
get(i) string Returns the symbol. If index a number, it is assumed to be an index in the range. If it is a character, it is assumed to be a code point.
transcode(text, options) string Returns the transcoded text.

If overlay is specified, it will be consulted first. overlay is used to override some symbols and create disjoint ranges. An overlay can have an overlay. An overlay can be a simple table: [a: '1', b: '2', c: '3'].

get() is used to get the symbol from the range. If index is a number, it is assumed to be an index in the range. Some ranges can have entries, which are not defined by a single symbol. For example, some decorated numbers can be in a range from 0 to 20. If we want to get a symbol for 12, we should use get(12). If it is a character, it is assumed to be a code point.

transcode(text, options) is used to transcode the text:

  • text โ€” the text to be transcoded.
  • options โ€” an object with the following properties:
    • missing โ€” if specified it will be a character to be used in place of characters in the text that are not transcoded. Otherwise, a character is left as is.

It consults the transcoding table using get() for every character in the text.

Function transcode()

transcode(text, options) is similar to the transcode() function in the alphanumeric/unicode-letters.js module:

  • text โ€” the text to be transcoded.
  • tables โ€” an object defining the transcoding tables:
    • If it is a function it is consulted on every character and cna return a new value or a falsy value to indicate that the character cannot be transcoded.
    • If it is an object with the transcode() method, it is used to transcode the text.
    • If it is an array, it is assumed be an array of transcoding tables. They will be tried in order.
  • options โ€” an object with the following properties:
    • missing โ€” if specified it will be a character to be used in place of characters in the text that are not transcoded. Otherwise, a character is left as is.