An open API service indexing awesome lists of open source software.

https://github.com/ebukaodini/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.
https://github.com/ebukaodini/ascii-map

ascii decimal hexadecimal html-code javascript octal

Last synced: about 2 months ago
JSON representation

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

Awesome Lists containing this project

README

        

# 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

```sh
npm install --save ascii-map
```

## Usage

```js
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](https://choosealicense.com/licenses/mit/)