# unicode-properties

> Provides fast access to unicode character properties

Latest version **1.4.1** (published 2022-06-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install unicode-properties
pnpm add unicode-properties
yarn add unicode-properties
bun add unicode-properties
```

## Health

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

Positive: has types package; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.1 |
| Published | 2022-06-19 |
| First published | 2015-04-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/unicode-properties) |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 74.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 60 |
| Author | Devon Govett |
| Maintainers | devongovett |
| Keywords | unicode, metadata, character, codepoint |

## Links

- npm: https://www.npmjs.com/package/unicode-properties
- Repository: https://github.com/devongovett/unicode-properties
- Issues: https://github.com/devongovett/unicode-properties/issues
- npm.io page: https://npm.io/package/unicode-properties

## Dependencies (2)

- [base64-js](https://npm.io/package/base64-js.md) ^1.3.0
- [unicode-trie](https://npm.io/package/unicode-trie.md) ^2.0.0

## Recent versions

- 1.4.1 (latest) — 2022-06-19
- 1.4.0 — 2022-06-18
- 1.3.1 — 2019-11-17
- 1.3.0 — 2019-11-17
- 1.2.2 — 2019-06-17
- 1.2.1 — 2019-06-17
- 1.2.0 — 2019-06-17
- 1.1.0 — 2015-07-28
- 1.0.0 — 2015-04-04

## README

# unicode-properties

Provides fast access to unicode character properties. Uses [unicode-trie](https://github.com/devongovett/unicode-trie) to compress the 
properties for all code points into just 9.5KB. Currently, unicode-properties supports Unicode version 12.

## Usage

    npm install unicode-properties

```javascript
var unicode = require('unicode-properties');

unicode.getCategory('2'.charCodeAt()) //=> 'Nd'
unicode.getNumericValue('2'.charCodeAt()) //=> 2
```

## API

### getCategory(codePoint)

Returns the unicode [general category](http://www.fileformat.info/info/unicode/category/index.htm) for the given code point.

### getScript(codePoint)

Returns the [script](http://unicode.org/standard/supported.html) for the given code point.

### getCombiningClass(codePoint)

Returns the [canonical combining class](http://unicode.org/glossary/#combining_class) for the given code point.

### getEastAsianWidth(codePoint)

Returns the [East Asian width](http://www.unicode.org/reports/tr11/tr11-28.html) for the given code point.

### getNumericValue(codePoint)

Returns the numeric value for the given code point, or null if there is no numeric value for that code point.

### isAlphabetic(codePoint)

Returns whether the code point is an alphabetic character.

### isDigit(codePoint)

Returns whether the code point is a digit.

### isPunctuation(codePoint)

Returns whether the code point is a punctuation character.

### isLowerCase(codePoint)

Returns whether the code point is lower case.

### isUpperCase(codePoint)

Returns whether the code point is upper case.

### isTitleCase(codePoint)

Returns whether the code point is title case.

### isWhiteSpace(codePoint)

Returns whether the code point is whitespace: specifically, whether the category is one of Zs, Zl, or Zp.

### isBaseForm(codePoint)

Returns whether the code point is a base form. A code point of base form does not graphically combine with preceding
characters.

### isMark(codePoint)

Returns whether the code point is a mark character (e.g. accent).

## License

MIT

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