Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRebecca Turner <me@re-becca.org>2018-06-07 22:18:32 +0300
committerRebecca Turner <me@re-becca.org>2018-06-08 05:33:34 +0300
commit0d5251f97dc8b8b143064869e530d465c757ffbb (patch)
tree70c23da57234c31ae34d499bf0aaa917bfdfddfa /node_modules/is-fullwidth-code-point
parent68a101859b2b6f78b2e7c3a936492acdb15f7c4a (diff)
chore: reshuffle is-fullwidth-code-point for better deduping
Diffstat (limited to 'node_modules/is-fullwidth-code-point')
-rw-r--r--node_modules/is-fullwidth-code-point/index.js72
-rw-r--r--node_modules/is-fullwidth-code-point/package.json42
-rw-r--r--node_modules/is-fullwidth-code-point/readme.md4
3 files changed, 59 insertions, 59 deletions
diff --git a/node_modules/is-fullwidth-code-point/index.js b/node_modules/is-fullwidth-code-point/index.js
index d506327c3..a7d3e3855 100644
--- a/node_modules/is-fullwidth-code-point/index.js
+++ b/node_modules/is-fullwidth-code-point/index.js
@@ -1,46 +1,46 @@
'use strict';
-/* eslint-disable yoda */
-module.exports = x => {
- if (Number.isNaN(x)) {
+var numberIsNan = require('number-is-nan');
+
+module.exports = function (x) {
+ if (numberIsNan(x)) {
return false;
}
+ // https://github.com/nodejs/io.js/blob/cff7300a578be1b10001f2d967aaedc88aee6402/lib/readline.js#L1369
+
// code points are derived from:
// http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt
- if (
- x >= 0x1100 && (
- x <= 0x115f || // Hangul Jamo
- x === 0x2329 || // LEFT-POINTING ANGLE BRACKET
- x === 0x232a || // RIGHT-POINTING ANGLE BRACKET
- // CJK Radicals Supplement .. Enclosed CJK Letters and Months
- (0x2e80 <= x && x <= 0x3247 && x !== 0x303f) ||
- // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
- (0x3250 <= x && x <= 0x4dbf) ||
- // CJK Unified Ideographs .. Yi Radicals
- (0x4e00 <= x && x <= 0xa4c6) ||
- // Hangul Jamo Extended-A
- (0xa960 <= x && x <= 0xa97c) ||
- // Hangul Syllables
- (0xac00 <= x && x <= 0xd7a3) ||
- // CJK Compatibility Ideographs
- (0xf900 <= x && x <= 0xfaff) ||
- // Vertical Forms
- (0xfe10 <= x && x <= 0xfe19) ||
- // CJK Compatibility Forms .. Small Form Variants
- (0xfe30 <= x && x <= 0xfe6b) ||
- // Halfwidth and Fullwidth Forms
- (0xff01 <= x && x <= 0xff60) ||
- (0xffe0 <= x && x <= 0xffe6) ||
- // Kana Supplement
- (0x1b000 <= x && x <= 0x1b001) ||
- // Enclosed Ideographic Supplement
- (0x1f200 <= x && x <= 0x1f251) ||
- // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
- (0x20000 <= x && x <= 0x3fffd)
- )
- ) {
+ if (x >= 0x1100 && (
+ x <= 0x115f || // Hangul Jamo
+ 0x2329 === x || // LEFT-POINTING ANGLE BRACKET
+ 0x232a === x || // RIGHT-POINTING ANGLE BRACKET
+ // CJK Radicals Supplement .. Enclosed CJK Letters and Months
+ (0x2e80 <= x && x <= 0x3247 && x !== 0x303f) ||
+ // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
+ 0x3250 <= x && x <= 0x4dbf ||
+ // CJK Unified Ideographs .. Yi Radicals
+ 0x4e00 <= x && x <= 0xa4c6 ||
+ // Hangul Jamo Extended-A
+ 0xa960 <= x && x <= 0xa97c ||
+ // Hangul Syllables
+ 0xac00 <= x && x <= 0xd7a3 ||
+ // CJK Compatibility Ideographs
+ 0xf900 <= x && x <= 0xfaff ||
+ // Vertical Forms
+ 0xfe10 <= x && x <= 0xfe19 ||
+ // CJK Compatibility Forms .. Small Form Variants
+ 0xfe30 <= x && x <= 0xfe6b ||
+ // Halfwidth and Fullwidth Forms
+ 0xff01 <= x && x <= 0xff60 ||
+ 0xffe0 <= x && x <= 0xffe6 ||
+ // Kana Supplement
+ 0x1b000 <= x && x <= 0x1b001 ||
+ // Enclosed Ideographic Supplement
+ 0x1f200 <= x && x <= 0x1f251 ||
+ // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
+ 0x20000 <= x && x <= 0x3fffd)) {
return true;
}
return false;
-};
+}
diff --git a/node_modules/is-fullwidth-code-point/package.json b/node_modules/is-fullwidth-code-point/package.json
index 1e2f37343..e73475abc 100644
--- a/node_modules/is-fullwidth-code-point/package.json
+++ b/node_modules/is-fullwidth-code-point/package.json
@@ -1,28 +1,28 @@
{
- "_from": "is-fullwidth-code-point@^2.0.0",
- "_id": "is-fullwidth-code-point@2.0.0",
+ "_from": "is-fullwidth-code-point@1.0.0",
+ "_id": "is-fullwidth-code-point@1.0.0",
"_inBundle": false,
- "_integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+ "_integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
"_location": "/is-fullwidth-code-point",
"_phantomChildren": {},
"_requested": {
- "type": "range",
+ "type": "version",
"registry": true,
- "raw": "is-fullwidth-code-point@^2.0.0",
+ "raw": "is-fullwidth-code-point@1.0.0",
"name": "is-fullwidth-code-point",
"escapedName": "is-fullwidth-code-point",
- "rawSpec": "^2.0.0",
+ "rawSpec": "1.0.0",
"saveSpec": null,
- "fetchSpec": "^2.0.0"
+ "fetchSpec": "1.0.0"
},
"_requiredBy": [
- "/slice-ansi",
- "/string-width"
+ "#USER",
+ "/"
],
- "_resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
- "_shasum": "a3b30a5c4f199183167aaab93beefae3ddfb654f",
- "_spec": "is-fullwidth-code-point@^2.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/string-width",
+ "_resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
+ "_shasum": "ef9e31386f031a7f0d643af82fde50c457ef00cb",
+ "_spec": "is-fullwidth-code-point@1.0.0",
+ "_where": "/Users/rebecca/code/npm",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
@@ -32,14 +32,17 @@
"url": "https://github.com/sindresorhus/is-fullwidth-code-point/issues"
},
"bundleDependencies": false,
+ "dependencies": {
+ "number-is-nan": "^1.0.0"
+ },
"deprecated": false,
"description": "Check if the character represented by a given Unicode code point is fullwidth",
"devDependencies": {
- "ava": "*",
- "xo": "*"
+ "ava": "0.0.4",
+ "code-point-at": "^1.0.0"
},
"engines": {
- "node": ">=4"
+ "node": ">=0.10.0"
},
"files": [
"index.js"
@@ -69,10 +72,7 @@
"url": "git+https://github.com/sindresorhus/is-fullwidth-code-point.git"
},
"scripts": {
- "test": "xo && ava"
+ "test": "node test.js"
},
- "version": "2.0.0",
- "xo": {
- "esnext": true
- }
+ "version": "1.0.0"
}
diff --git a/node_modules/is-fullwidth-code-point/readme.md b/node_modules/is-fullwidth-code-point/readme.md
index 093b0281b..4936464b1 100644
--- a/node_modules/is-fullwidth-code-point/readme.md
+++ b/node_modules/is-fullwidth-code-point/readme.md
@@ -13,7 +13,7 @@ $ npm install --save is-fullwidth-code-point
## Usage
```js
-const isFullwidthCodePoint = require('is-fullwidth-code-point');
+var isFullwidthCodePoint = require('is-fullwidth-code-point');
isFullwidthCodePoint('谢'.codePointAt());
//=> true
@@ -36,4 +36,4 @@ Type: `number`
## License
-MIT © [Sindre Sorhus](https://sindresorhus.com)
+MIT © [Sindre Sorhus](http://sindresorhus.com)