0.4.2 • Published 5 years ago

ascii-chr v0.4.2

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

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.

0.4.2

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.0

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago