nv-char-basic
v1.0.3
Published
nv-char-basic =============== - nv-char-basic - some basic char-names /char-codes/char-code-points consts AND simple-function
Downloads
10
Readme
nv-char-basic
- nv-char-basic
- some basic char-names /char-codes/char-code-points consts AND simple-function
install
- npm install nv-char-basic
usage
example
> '𝑒'.length
2
> Array.from('𝑒')
[ '𝑒' ]
> Array.from('𝑒').length
1
>
> '𝑒'.codePointAt(0)
119890
> '𝑒'.charCodeAt(0)
55349
> '𝑒'.charCodeAt(1)
56402
> x.is_high_code(55349)
true
> x.is_low_code(56402)
true
>
> x.get_code_point_from_high_low(55349,56402)
119890
>
>x.get_high_low_from_code_point(119890)
[ 55349, 56402 ]
>
API
{
CODE_DICT: {
backSpace: 8,
tab: 9,
lineFeed: 10,
lineTab: 11,
formFeed: 12,
carriageReturn: 13,
shiftOut: 14,
space: 32,
exclamationMark: 33,
quotationMark: 34,
numberSign: 35,
dollarSign: 36,
percentSign: 37,
ampersand: 38,
apostrophe: 39,
leftParenthesis: 40,
rightParenthesis: 41,
asterisk: 42,
plusSign: 43,
comma: 44,
dash: 45,
dot: 46,
slash: 47,
digit0: 48,
digit1: 49,
digit2: 50,
digit3: 51,
digit4: 52,
digit5: 53,
digit6: 54,
digit7: 55,
digit8: 56,
digit9: 57,
colon: 58,
semicolon: 59,
lessThan: 60,
equalsTo: 61,
greaterThan: 62,
questionMark: 63,
atSign: 64,
uppercaseA: 65,
uppercaseB: 66,
uppercaseC: 67,
uppercaseD: 68,
uppercaseE: 69,
uppercaseF: 70,
uppercaseG: 71,
uppercaseH: 72,
uppercaseI: 73,
uppercaseJ: 74,
uppercaseK: 75,
uppercaseL: 76,
uppercaseM: 77,
uppercaseN: 78,
uppercaseO: 79,
uppercaseP: 80,
uppercaseQ: 81,
uppercaseR: 82,
uppercaseS: 83,
uppercaseT: 84,
uppercaseU: 85,
uppercaseV: 86,
uppercaseW: 87,
uppercaseX: 88,
uppercaseY: 89,
uppercaseZ: 90,
leftSquareBracket: 91,
backslash: 92,
rightSquareBracket: 93,
caret: 94,
underscore: 95,
graveAccent: 96,
lowercaseA: 97,
lowercaseB: 98,
lowercaseC: 99,
lowercaseD: 100,
lowercaseE: 101,
lowercaseF: 102,
lowercaseG: 103,
lowercaseH: 104,
lowercaseI: 105,
lowercaseJ: 106,
lowercaseK: 107,
lowercaseL: 108,
lowercaseM: 109,
lowercaseN: 110,
lowercaseO: 111,
lowercaseP: 112,
lowercaseQ: 113,
lowercaseR: 114,
lowercaseS: 115,
lowercaseT: 116,
lowercaseU: 117,
lowercaseV: 118,
lowercaseW: 119,
lowercaseX: 120,
lowercaseY: 121,
lowercaseZ: 122,
leftCurlyBrace: 123,
verticalBar: 124,
rightCurlyBrace: 125,
tilde: 126,
nonBreakingSpace: 160,
oghamSpaceMark: 5760,
enQuad: 8192,
emQuad: 8193,
enSpace: 8194,
emSpace: 8195,
threePerEmSpace: 8196,
fourPerEmSpace: 8197,
sixPerEmSpace: 8198,
figureSpace: 8199,
punctuationSpace: 8200,
thinSpace: 8201,
hairSpace: 8202,
lineSeparator: 8232,
paragraphSeparator: 8233,
narrowNoBreakSpace: 8239,
mediumMathematicalSpace: 8287,
ideographicSpace: 12288,
zeroWidthNoBreakSpace: 65279
},
CH_DICT: {
backSpace: '\b',
tab: '\t',
lineFeed: '\n',
lineTab: '\x0B',
formFeed: '\f',
carriageReturn: '\r',
shiftOut: '\x0E',
space: ' ',
exclamationMark: '!',
quotationMark: '"',
numberSign: '#',
dollarSign: '$',
percentSign: '%',
ampersand: '&',
apostrophe: "'",
leftParenthesis: '(',
rightParenthesis: ')',
asterisk: '*',
plusSign: '+',
comma: ',',
dash: '-',
dot: '.',
slash: '/',
digit0: '0',
digit1: '1',
digit2: '2',
digit3: '3',
digit4: '4',
digit5: '5',
digit6: '6',
digit7: '7',
digit8: '8',
digit9: '9',
colon: ':',
semicolon: ';',
lessThan: '<',
equalsTo: '=',
greaterThan: '>',
questionMark: '?',
atSign: '@',
uppercaseA: 'A',
uppercaseB: 'B',
uppercaseC: 'C',
uppercaseD: 'D',
uppercaseE: 'E',
uppercaseF: 'F',
uppercaseG: 'G',
uppercaseH: 'H',
uppercaseI: 'I',
uppercaseJ: 'J',
uppercaseK: 'K',
uppercaseL: 'L',
uppercaseM: 'M',
uppercaseN: 'N',
uppercaseO: 'O',
uppercaseP: 'P',
uppercaseQ: 'Q',
uppercaseR: 'R',
uppercaseS: 'S',
uppercaseT: 'T',
uppercaseU: 'U',
uppercaseV: 'V',
uppercaseW: 'W',
uppercaseX: 'X',
uppercaseY: 'Y',
uppercaseZ: 'Z',
leftSquareBracket: '[',
backslash: '\\',
rightSquareBracket: ']',
caret: '^',
underscore: '_',
graveAccent: '`',
lowercaseA: 'a',
lowercaseB: 'b',
lowercaseC: 'c',
lowercaseD: 'd',
lowercaseE: 'e',
lowercaseF: 'f',
lowercaseG: 'g',
lowercaseH: 'h',
lowercaseI: 'i',
lowercaseJ: 'j',
lowercaseK: 'k',
lowercaseL: 'l',
lowercaseM: 'm',
lowercaseN: 'n',
lowercaseO: 'o',
lowercaseP: 'p',
lowercaseQ: 'q',
lowercaseR: 'r',
lowercaseS: 's',
lowercaseT: 't',
lowercaseU: 'u',
lowercaseV: 'v',
lowercaseW: 'w',
lowercaseX: 'x',
lowercaseY: 'y',
lowercaseZ: 'z',
leftCurlyBrace: '{',
verticalBar: '|',
rightCurlyBrace: '}',
tilde: '~',
nonBreakingSpace: ' ',
oghamSpaceMark: ' ',
enQuad: ' ',
emQuad: ' ',
enSpace: ' ',
emSpace: ' ',
threePerEmSpace: ' ',
fourPerEmSpace: ' ',
sixPerEmSpace: ' ',
figureSpace: ' ',
punctuationSpace: ' ',
thinSpace: ' ',
hairSpace: ' ',
lineSeparator: '�',
paragraphSeparator: '�',
narrowNoBreakSpace: ' ',
mediumMathematicalSpace: ' ',
ideographicSpace: ' ',
zeroWidthNoBreakSpace: ''
},
CODE_NAME_MP: Map(121) {
8 => 'backSpace',
9 => 'tab',
10 => 'lineFeed',
11 => 'lineTab',
12 => 'formFeed',
13 => 'carriageReturn',
14 => 'shiftOut',
32 => 'space',
33 => 'exclamationMark',
34 => 'quotationMark',
35 => 'numberSign',
36 => 'dollarSign',
37 => 'percentSign',
38 => 'ampersand',
39 => 'apostrophe',
40 => 'leftParenthesis',
41 => 'rightParenthesis',
42 => 'asterisk',
43 => 'plusSign',
44 => 'comma',
45 => 'dash',
46 => 'dot',
47 => 'slash',
48 => 'digit0',
49 => 'digit1',
50 => 'digit2',
51 => 'digit3',
52 => 'digit4',
53 => 'digit5',
54 => 'digit6',
55 => 'digit7',
56 => 'digit8',
57 => 'digit9',
58 => 'colon',
59 => 'semicolon',
60 => 'lessThan',
61 => 'equalsTo',
62 => 'greaterThan',
63 => 'questionMark',
64 => 'atSign',
65 => 'uppercaseA',
66 => 'uppercaseB',
67 => 'uppercaseC',
68 => 'uppercaseD',
69 => 'uppercaseE',
70 => 'uppercaseF',
71 => 'uppercaseG',
72 => 'uppercaseH',
73 => 'uppercaseI',
74 => 'uppercaseJ',
75 => 'uppercaseK',
76 => 'uppercaseL',
77 => 'uppercaseM',
78 => 'uppercaseN',
79 => 'uppercaseO',
80 => 'uppercaseP',
81 => 'uppercaseQ',
82 => 'uppercaseR',
83 => 'uppercaseS',
84 => 'uppercaseT',
85 => 'uppercaseU',
86 => 'uppercaseV',
87 => 'uppercaseW',
88 => 'uppercaseX',
89 => 'uppercaseY',
90 => 'uppercaseZ',
91 => 'leftSquareBracket',
92 => 'backslash',
93 => 'rightSquareBracket',
94 => 'caret',
95 => 'underscore',
96 => 'graveAccent',
97 => 'lowercaseA',
98 => 'lowercaseB',
99 => 'lowercaseC',
100 => 'lowercaseD',
101 => 'lowercaseE',
102 => 'lowercaseF',
103 => 'lowercaseG',
104 => 'lowercaseH',
105 => 'lowercaseI',
106 => 'lowercaseJ',
107 => 'lowercaseK',
108 => 'lowercaseL',
109 => 'lowercaseM',
110 => 'lowercaseN',
111 => 'lowercaseO',
112 => 'lowercaseP',
113 => 'lowercaseQ',
114 => 'lowercaseR',
115 => 'lowercaseS',
116 => 'lowercaseT',
117 => 'lowercaseU',
118 => 'lowercaseV',
119 => 'lowercaseW',
120 => 'lowercaseX',
121 => 'lowercaseY',
122 => 'lowercaseZ',
123 => 'leftCurlyBrace',
124 => 'verticalBar',
125 => 'rightCurlyBrace',
126 => 'tilde',
160 => 'nonBreakingSpace',
5760 => 'oghamSpaceMark',
8192 => 'enQuad',
8193 => 'emQuad',
8194 => 'enSpace',
8195 => 'emSpace',
8196 => 'threePerEmSpace',
8197 => 'fourPerEmSpace',
8198 => 'sixPerEmSpace',
8199 => 'figureSpace',
8200 => 'punctuationSpace',
8201 => 'thinSpace',
8202 => 'hairSpace',
8232 => 'lineSeparator',
8233 => 'paragraphSeparator',
8239 => 'narrowNoBreakSpace',
8287 => 'mediumMathematicalSpace',
12288 => 'ideographicSpace',
65279 => 'zeroWidthNoBreakSpace'
},
cd2ch: [Function: cd2ch],
ch2cd: [Function: ch2cd],
cd2n: [Function: cd2n],
n2cd: [Function: n2cd],
n2ch: [Function: n2ch],
ch2n: [Function: ch2n],
is_high_code: [Function: is_high_code],
is_low_code: [Function: is_low_code],
get_code_point_from_high_low: [Function: get_code_point_from_high_low],
get_high_low_from_code_point: [Function: get_high_low_from_code_point],
is_length1_code_point: [Function: is_length1_code_point],
is_length2_code_point: [Function: is_length2_code_point]
}
LICENSE
- ISC