ascii-chr
TypeScript icon, indicating that this package has built-in type declarations

0.4.2 • Public • Published

ascii-chr

npm GitHub license Build Status Coverage Status

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.

Readme

Keywords

Package Sidebar

Install

npm i ascii-chr

Weekly Downloads

10

Version

0.4.2

License

MIT

Unpacked Size

59.8 kB

Total Files

19

Last publish

Collaborators

  • asm