Socket
Socket
Sign inDemoInstall

is-fullwidth-code-point

Package Overview
Dependencies
1
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.0 to 5.0.0

35

index.js

@@ -1,2 +0,2 @@

/* eslint-disable yoda */
import {eastAsianWidth} from 'get-east-asian-width';

@@ -8,34 +8,3 @@ export default function isFullwidthCodePoint(codePoint) {

// Code points are derived from:
// https://unicode.org/Public/UNIDATA/EastAsianWidth.txt
return codePoint >= 0x1100 && (
codePoint <= 0x115F || // Hangul Jamo
codePoint === 0x2329 || // LEFT-POINTING ANGLE BRACKET
codePoint === 0x232A || // RIGHT-POINTING ANGLE BRACKET
// CJK Radicals Supplement .. Enclosed CJK Letters and Months
(0x2E80 <= codePoint && codePoint <= 0x3247 && codePoint !== 0x303F) ||
// Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
(0x3250 <= codePoint && codePoint <= 0x4DBF) ||
// CJK Unified Ideographs .. Yi Radicals
(0x4E00 <= codePoint && codePoint <= 0xA4C6) ||
// Hangul Jamo Extended-A
(0xA960 <= codePoint && codePoint <= 0xA97C) ||
// Hangul Syllables
(0xAC00 <= codePoint && codePoint <= 0xD7A3) ||
// CJK Compatibility Ideographs
(0xF900 <= codePoint && codePoint <= 0xFAFF) ||
// Vertical Forms
(0xFE10 <= codePoint && codePoint <= 0xFE19) ||
// CJK Compatibility Forms .. Small Form Variants
(0xFE30 <= codePoint && codePoint <= 0xFE6B) ||
// Halfwidth and Fullwidth Forms
(0xFF01 <= codePoint && codePoint <= 0xFF60) ||
(0xFFE0 <= codePoint && codePoint <= 0xFFE6) ||
// Kana Supplement
(0x1B000 <= codePoint && codePoint <= 0x1B001) ||
// Enclosed Ideographic Supplement
(0x1F200 <= codePoint && codePoint <= 0x1F251) ||
// CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
(0x20000 <= codePoint && codePoint <= 0x3FFFD)
);
return eastAsianWidth(codePoint) === 2;
}

21

package.json
{
"name": "is-fullwidth-code-point",
"version": "4.0.0",
"version": "5.0.0",
"description": "Check if the character represented by a given Unicode code point is fullwidth",

@@ -14,5 +14,8 @@ "license": "MIT",

"type": "module",
"exports": "./index.js",
"exports": {
"types": "./index.d.ts",
"default": "./index.js"
},
"engines": {
"node": ">=12"
"node": ">=18"
},

@@ -39,9 +42,13 @@ "scripts": {

"detect",
"check"
"check",
"east-asian-width"
],
"devDependencies": {
"ava": "^3.15.0",
"tsd": "^0.14.0",
"xo": "^0.38.2"
"ava": "^5.3.1",
"tsd": "^0.29.0",
"xo": "^0.56.0"
},
"dependencies": {
"get-east-asian-width": "^1.0.0"
}
}

@@ -7,5 +7,5 @@ # is-fullwidth-code-point

```sh
npm install is-fullwidth-code-point
```
$ npm install is-fullwidth-code-point
```

@@ -33,13 +33,1 @@ ## Usage

The [code point](https://en.wikipedia.org/wiki/Code_point) of a character.
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-is-fullwidth-code-point?utm_source=npm-is-fullwidth-code-point&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>
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