ascii-chr
v0.4.2
Published
ASCII character codes table
Downloads
615
Readme
ascii-chr
Installation
# npm
npm install ascii-chr
# yarn
yarn add ascii-chr
Usage
const {
charCode,
charCodes2: CHR2,
charCodes: CHR,
codePoint,
} = require('ascii-chr');
CHR[0] // \u0000 (NUL)
CHR[256] // \u0000 (NUL)
CHR[65535 & 0xff] // \u00ff (ÿ)
CHR2[1024] // \u0400 (Ѐ)
// Tree-shaking support
codePoint // String.fromCodePoint
charCode // String.fromCharCode
const {
makeCharCodes,
makeCharCodes2,
} = require('ascii-chr/factories');
makeCharCodes() // ASCII+ (257)
makeCharCodes() // UTF-8 (2049)
Tests
Run tests as follows:
npm run test
License
ASCII CHR is licensed under MIT and can be used for any personal or commercial project.