Skip to content

A lightweight representation of the ascii table that makes it easy to convert to and fro character, decimal, hexadecimal, octal, HTML code, HTML name.

Notifications You must be signed in to change notification settings

ebukaodini/ascii-map

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ascii-map

A lightweight representation of the ascii table that makes it easy to convert to and fro character, decimal, hexadecimal, octal, HTML code, HTML name.

Install

npm install --save ascii-map

Usage

const { char, dec, hex, oct, bin, htmlCode, htmlName } = require("ascii-map");

char("A") // { dec: "65", hex: "41", oct: "101", bin: "01000001", htmlCode: "A", htmlName: undefined, char: "A", desc: "Upper Case Letter A" }

dec("65").bin // 01000001

hex("41").oct // 101

oct("101").char // A

bin("01000001").htmlCode // A

htmlCode("A").desc // Upper Case Letter A

htmlName("$").dec // 36

char("AA") // undefined

Note

  • Characters without htmlName returns undefined.
  • Trying to read the properties of an undefined character throws TypeError: Cannot read properties of undefined error.

Table was derived from https://www.lookuptables.com/text/ascii-table

License

MIT

About

A lightweight representation of the ascii table that makes it easy to convert to and fro character, decimal, hexadecimal, octal, HTML code, HTML name.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published