@nxmix/is-full-width
Version:
> Check if the character represented by a given [Unicode code point](https://en.wikipedia.org/wiki/Code_point) is [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms)
44 lines (25 loc) • 1.21 kB
Markdown
> Check if the character represented by a given [Unicode code point](https://en.wikipedia.org/wiki/Code_point) is [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms)
Compare to [is-fullwidth-codepoint](https://github.com/sindresorhus/is-fullwidth-code-point), I'm trying to give a fully accurate implementation of official [Unicode EastAsianWidth specification v11.0](ftp://ftp.unicode.org/Public/11.0.0/ucd/EastAsianWidth.txt).
The code in `src/index.ts` is generated by an internal tool that reflects the contents of the specification range by range.
```
$ npm install @nxmix/is-full-width
```
[](https://www.typescriptlang.org) definition file is already included.
```js
const isFullwidth = require('is-full-width');
isFullwidth('谢'.codePointAt());
//=> true
isFullwidth('a'.codePointAt());
//=> false
```
Type: `number`
[](https://en.wikipedia.org/wiki/Code_point) of a character.
MIT