https://github.com/awerlang/ascii-category
Attribute category from a key code or character
https://github.com/awerlang/ascii-category
ansi ascii categorization char key keyboard keydown keypress keyup
Last synced: 9 days ago
JSON representation
Attribute category from a key code or character
- Host: GitHub
- URL: https://github.com/awerlang/ascii-category
- Owner: awerlang
- License: mit
- Created: 2018-08-01T03:11:09.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-04-10T17:34:26.000Z (over 7 years ago)
- Last Synced: 2025-10-26T13:50:42.133Z (9 months ago)
- Topics: ansi, ascii, categorization, char, key, keyboard, keydown, keypress, keyup
- Language: TypeScript
- Homepage: http://blog.werlangtecnologia.com.br/ascii-category/
- Size: 149 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ascii-category
[](https://www.npmjs.com/package/ascii-category)
[](https://opensource.org/licenses/MIT)
[](https://travis-ci.org/awerlang/ascii-category)
[](https://codeclimate.com/github/awerlang/ascii-category)

Attribute category from a key code or character.
# Install
```
npm i ascii-category
```
# Usage
```
import * as ascii from 'ascii-category'
```
or if you're old-school:
```
var ascii = require('ascii-category')
```
# API
```
> const key = 48
> ascii.isDigit(key)
true
```
```
> event.which === ascii.Enter
true | false
```
# Docs
Go to http://blog.werlangtecnologia.com.br/ascii-category/
# License
MIT