@nxmix/is-full-width
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

@nxmix/is-full-width Build Status

Check if the character represented by a given Unicode code point is fullwidth

Why another is-fullwidth-code-point?

Compare to is-fullwidth-codepoint, I'm trying to give a fully accurate implementation of official Unicode EastAsianWidth specification v11.0.

The code in src/index.ts is generated by an internal tool that reflects the contents of the specification range by range.

Install

$ npm install @nxmix/is-full-width

Typescript definition file is already included.

Usage

const isFullwidth = require('is-full-width');

isFullwidth('谢'.codePointAt());
//=> true

isFullwidth('a'.codePointAt());
//=> false

API

isFullwidth(input)

input

Type: number

Code point of a character.

License

MIT

Package Sidebar

Install

npm i @nxmix/is-full-width

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

23.5 kB

Total Files

5

Last publish

Collaborators

  • jacobbubu
  • nxdeploy
  • zhengle