LINXD-1029: Add relative path to simulator

This commit is contained in:
2019-11-07 15:11:05 +02:00
parent 2ae9e00260
commit c4b856da62
65 changed files with 2948 additions and 3565 deletions

View File

@ -1,46 +1,46 @@
'use strict';
var numberIsNan = require('number-is-nan');
module.exports = function (x) {
if (numberIsNan(x)) {
/* eslint-disable yoda */
module.exports = x => {
if (Number.isNaN(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
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)) {
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)
)
) {
return true;
}
return false;
}
};

View File

@ -1,27 +1,27 @@
{
"_from": "is-fullwidth-code-point@^1.0.0",
"_id": "is-fullwidth-code-point@1.0.0",
"_from": "is-fullwidth-code-point@^2.0.0",
"_id": "is-fullwidth-code-point@2.0.0",
"_inBundle": false,
"_integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
"_integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
"_location": "/is-fullwidth-code-point",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "is-fullwidth-code-point@^1.0.0",
"raw": "is-fullwidth-code-point@^2.0.0",
"name": "is-fullwidth-code-point",
"escapedName": "is-fullwidth-code-point",
"rawSpec": "^1.0.0",
"rawSpec": "^2.0.0",
"saveSpec": null,
"fetchSpec": "^1.0.0"
"fetchSpec": "^2.0.0"
},
"_requiredBy": [
"/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": "/home/sergiu/linx-audio-simulator/node_modules/string-width",
"_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": "/home/sergiu/linx-simulator2/node_modules/string-width",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
@ -31,17 +31,14 @@
"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": "0.0.4",
"code-point-at": "^1.0.0"
"ava": "*",
"xo": "*"
},
"engines": {
"node": ">=0.10.0"
"node": ">=4"
},
"files": [
"index.js"
@ -71,7 +68,10 @@
"url": "git+https://github.com/sindresorhus/is-fullwidth-code-point.git"
},
"scripts": {
"test": "node test.js"
"test": "xo && ava"
},
"version": "1.0.0"
"version": "2.0.0",
"xo": {
"esnext": true
}
}

View File

@ -13,7 +13,7 @@ $ npm install --save is-fullwidth-code-point
## Usage
```js
var isFullwidthCodePoint = require('is-fullwidth-code-point');
const isFullwidthCodePoint = require('is-fullwidth-code-point');
isFullwidthCodePoint('谢'.codePointAt());
//=> true
@ -36,4 +36,4 @@ Type: `number`
## License
MIT © [Sindre Sorhus](http://sindresorhus.com)
MIT © [Sindre Sorhus](https://sindresorhus.com)