Socket
Socket
Sign inDemoInstall

is-fullwidth-code-point

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    is-fullwidth-code-point

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


Version published
Weekly downloads
74M
decreased by-18.65%
Maintainers
1
Install size
6.23 kB
Created
Weekly downloads
 

Package description

What is is-fullwidth-code-point?

The is-fullwidth-code-point npm package is used to determine if a given Unicode code point will be displayed as full-width in a terminal. Full-width characters take up two spaces in a monospace grid, as opposed to half-width characters that take up one space. This is particularly useful when dealing with CJK (Chinese, Japanese, and Korean) characters, emojis, or other symbols that may not conform to the standard width of ASCII characters.

What are is-fullwidth-code-point's main functionalities?

Check if a code point is full-width

This feature allows you to check if a single Unicode code point is considered full-width. The function returns a boolean value.

const isFullwidthCodePoint = require('is-fullwidth-code-point');

console.log(isFullwidthCodePoint('あ'.codePointAt(0))); // true
console.log(isFullwidthCodePoint('A'.codePointAt(0))); // false

Other packages similar to is-fullwidth-code-point

Readme

Source

is-fullwidth-code-point

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

Install

$ npm install is-fullwidth-code-point

Usage

import isFullwidthCodePoint from 'is-fullwidth-code-point';

isFullwidthCodePoint('谢'.codePointAt(0));
//=> true

isFullwidthCodePoint('a'.codePointAt(0));
//=> false

API

isFullwidthCodePoint(codePoint)

codePoint

Type: number

The code point of a character.


Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.

Keywords

FAQs

Last updated on 16 Apr 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc