# ascii-codes

> ASCII table reference and lookup functions

Latest version **1.0.0** (published 2015-04-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install ascii-codes
pnpm add ascii-codes
yarn add ascii-codes
bun add ascii-codes
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-04-05 |
| First published | 2015-04-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Chris Andrejewski |
| Maintainers | andrejewski |
| Keywords | ascii, lookup, table, codes |

## Links

- npm: https://www.npmjs.com/package/ascii-codes
- Repository: https://github.com/andrejewski/ascii-codes
- Issues: https://github.com/andrejewski/ascii-codes/issues
- npm.io page: https://npm.io/package/ascii-codes

## Alternatives

- [@lexical/table](https://npm.io/package/@lexical/table.md) — 3.0M weekly downloads
- [mantine-datatable](https://npm.io/package/mantine-datatable.md) — 98.2K weekly downloads
- [react-native-collapsible-tab-view](https://npm.io/package/react-native-collapsible-tab-view.md) — 70.6K weekly downloads
- [@handsontable/vue3](https://npm.io/package/@handsontable/vue3.md) — 16.1K weekly downloads
- [vuewordcloud](https://npm.io/package/vuewordcloud.md) — 7.2K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2015-04-05

## README

# ascii-codes

ASCII table reference and lookup functions

```bash
npm install ascii-codes
```

## Usage

```js
var ascii = require('ascii-codes');
var assert = require('assert');

assert.equal("A", ascii.symbolForDecimal(65));
assert.equal("A", ascii.symbolForHex("41"));
assert.equal("A", ascii.symbolForOctal("101"));

assert.equal(65, ascii.decimalForSymbol("A"));
assert.equal("41", ascii.hexForSymbol("A"));
assert.equal("101", ascii.octalForSymbol("A"));

/*
	Note: You can write number literals in hex and octal. Use symbolForDecimal() for those.
*/
assert.equal("A", ascii.symbolForDecimal(0x41));
assert.equal("A", ascii.symbolForDecimal(0101));
```

## Documentation

```
ascii-codes
    symbolForDecimal(Number) String
		returns the symbol for a given decimal 
    symbolForHex(String) String
		returns the symbol for a given hexidecimal string 
    symbolForOctal(String) String
		returns the symbol for a given octal string 
    decimalForSymbol(String) Number
		returns the decimal for a given symbol 
    hexForSymbol(String) String
		returns the hexidecimal string for a given symbol 
    octalForSymbol(String) String
		returns the octal string for a given symbol 
    symbolIndex Array[String]
		contains the table of ASCII codes 
```

## Contributing

Issues and pull requests are welcome.

```bash
# running tests
npm test
```

Follow me on [Twitter](https://twitter.com/compooter) for updates or just for the lolz and please check out my other [repositories](https://github.com/andrejewski) if I have earned it. I thank you for reading.

---
_Source: https://npm.io/package/ascii-codes · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
