pnpm 6.22.1 → 6.23.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/node_modules/ansi-regex/index.js +8 -2
- package/dist/node_modules/ansi-regex/license +4 -16
- package/dist/node_modules/ansi-regex/package.json +53 -62
- package/dist/node_modules/aproba/index.js +33 -33
- package/dist/node_modules/aproba/package.json +5 -4
- package/dist/node_modules/are-we-there-yet/{index.js → lib/index.js} +0 -0
- package/dist/node_modules/are-we-there-yet/{tracker-base.js → lib/tracker-base.js} +0 -0
- package/dist/node_modules/are-we-there-yet/{tracker-group.js → lib/tracker-group.js} +14 -5
- package/dist/node_modules/are-we-there-yet/{tracker-stream.js → lib/tracker-stream.js} +0 -0
- package/dist/node_modules/are-we-there-yet/{tracker.js → lib/tracker.js} +3 -1
- package/dist/node_modules/are-we-there-yet/package.json +35 -17
- package/dist/node_modules/{npmlog → color-support}/LICENSE +0 -0
- package/dist/node_modules/color-support/bin.js +3 -0
- package/dist/node_modules/color-support/browser.js +14 -0
- package/dist/node_modules/color-support/index.js +134 -0
- package/dist/node_modules/color-support/package.json +36 -0
- package/dist/node_modules/gauge/{base-theme.js → lib/base-theme.js} +7 -3
- package/dist/node_modules/gauge/lib/demo.js +45 -0
- package/dist/node_modules/gauge/{error.js → lib/error.js} +0 -0
- package/dist/node_modules/gauge/lib/has-color.js +4 -0
- package/dist/node_modules/gauge/{index.js → lib/index.js} +90 -33
- package/dist/node_modules/gauge/{plumbing.js → lib/plumbing.js} +3 -1
- package/dist/node_modules/gauge/{process.js → lib/process.js} +0 -0
- package/dist/node_modules/gauge/{progress-bar.js → lib/progress-bar.js} +12 -6
- package/dist/node_modules/gauge/{render-template.js → lib/render-template.js} +69 -28
- package/dist/node_modules/gauge/{set-immediate.js → lib/set-immediate.js} +0 -0
- package/dist/node_modules/gauge/{set-interval.js → lib/set-interval.js} +0 -0
- package/dist/node_modules/gauge/{spin.js → lib/spin.js} +0 -0
- package/dist/node_modules/gauge/{template-item.js → lib/template-item.js} +21 -7
- package/dist/node_modules/gauge/{theme-set.js → lib/theme-set.js} +31 -24
- package/dist/node_modules/gauge/lib/themes.js +56 -0
- package/dist/node_modules/gauge/{wide-truncate.js → lib/wide-truncate.js} +9 -3
- package/dist/node_modules/gauge/package.json +39 -40
- package/dist/node_modules/is-fullwidth-code-point/index.js +40 -36
- package/dist/node_modules/is-fullwidth-code-point/license +4 -16
- package/dist/node_modules/is-fullwidth-code-point/package.json +40 -43
- package/dist/node_modules/node-gyp/package.json +2 -2
- package/dist/node_modules/npmlog/{log.js → lib/log.js} +148 -54
- package/dist/node_modules/npmlog/package.json +30 -12
- package/dist/node_modules/readable-stream/errors-browser.js +127 -0
- package/dist/node_modules/readable-stream/errors.js +116 -0
- package/dist/node_modules/readable-stream/experimentalWarning.js +17 -0
- package/dist/node_modules/readable-stream/lib/_stream_duplex.js +52 -44
- package/dist/node_modules/readable-stream/lib/_stream_passthrough.js +1 -9
- package/dist/node_modules/readable-stream/lib/_stream_readable.js +446 -341
- package/dist/node_modules/readable-stream/lib/_stream_transform.js +29 -42
- package/dist/node_modules/readable-stream/lib/_stream_writable.js +200 -190
- package/dist/node_modules/readable-stream/lib/internal/streams/async_iterator.js +207 -0
- package/dist/node_modules/readable-stream/lib/internal/streams/buffer_list.js +210 -0
- package/dist/node_modules/readable-stream/lib/internal/streams/destroy.js +48 -17
- package/dist/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +104 -0
- package/dist/node_modules/readable-stream/lib/internal/streams/from-browser.js +3 -0
- package/dist/node_modules/readable-stream/lib/internal/streams/from.js +64 -0
- package/dist/node_modules/readable-stream/lib/internal/streams/pipeline.js +97 -0
- package/dist/node_modules/readable-stream/lib/internal/streams/state.js +27 -0
- package/dist/node_modules/readable-stream/package.json +35 -19
- package/dist/node_modules/readable-stream/readable-browser.js +2 -0
- package/dist/node_modules/readable-stream/readable.js +5 -8
- package/dist/node_modules/safe-buffer/index.js +3 -0
- package/dist/node_modules/safe-buffer/package.json +18 -4
- package/dist/node_modules/signal-exit/index.js +30 -8
- package/dist/node_modules/signal-exit/package.json +7 -5
- package/dist/node_modules/socks-proxy-agent/package.json +2 -2
- package/dist/node_modules/string-width/index.js +29 -19
- package/dist/node_modules/string-width/license +4 -16
- package/dist/node_modules/string-width/package.json +54 -54
- package/dist/node_modules/string_decoder/package.json +5 -2
- package/dist/node_modules/strip-ansi/index.js +2 -4
- package/dist/node_modules/strip-ansi/license +4 -16
- package/dist/node_modules/strip-ansi/package.json +52 -55
- package/dist/pnpm.cjs +746 -667
- package/package.json +18 -18
- package/dist/node_modules/are-we-there-yet/LICENSE +0 -5
- package/dist/node_modules/code-point-at/index.js +0 -32
- package/dist/node_modules/code-point-at/license +0 -21
- package/dist/node_modules/code-point-at/package.json +0 -38
- package/dist/node_modules/core-util-is/LICENSE +0 -19
- package/dist/node_modules/core-util-is/lib/util.js +0 -107
- package/dist/node_modules/core-util-is/package.json +0 -38
- package/dist/node_modules/gauge/LICENSE +0 -13
- package/dist/node_modules/gauge/has-color.js +0 -12
- package/dist/node_modules/gauge/themes.js +0 -54
- package/dist/node_modules/isarray/component.json +0 -19
- package/dist/node_modules/isarray/index.js +0 -5
- package/dist/node_modules/isarray/package.json +0 -45
- package/dist/node_modules/isarray/test.js +0 -20
- package/dist/node_modules/number-is-nan/index.js +0 -4
- package/dist/node_modules/number-is-nan/license +0 -21
- package/dist/node_modules/number-is-nan/package.json +0 -35
- package/dist/node_modules/object-assign/index.js +0 -90
- package/dist/node_modules/object-assign/license +0 -21
- package/dist/node_modules/object-assign/package.json +0 -42
- package/dist/node_modules/process-nextick-args/index.js +0 -45
- package/dist/node_modules/process-nextick-args/package.json +0 -25
- package/dist/node_modules/readable-stream/duplex-browser.js +0 -1
- package/dist/node_modules/readable-stream/duplex.js +0 -1
- package/dist/node_modules/readable-stream/lib/internal/streams/BufferList.js +0 -79
- package/dist/node_modules/readable-stream/passthrough.js +0 -1
- package/dist/node_modules/readable-stream/transform.js +0 -1
- package/dist/node_modules/readable-stream/writable-browser.js +0 -1
- package/dist/node_modules/readable-stream/writable.js +0 -8
- package/dist/node_modules/wide-align/node_modules/ansi-regex/index.js +0 -10
- package/dist/node_modules/wide-align/node_modules/ansi-regex/license +0 -9
- package/dist/node_modules/wide-align/node_modules/ansi-regex/package.json +0 -55
- package/dist/node_modules/wide-align/node_modules/is-fullwidth-code-point/index.js +0 -50
- package/dist/node_modules/wide-align/node_modules/is-fullwidth-code-point/license +0 -9
- package/dist/node_modules/wide-align/node_modules/is-fullwidth-code-point/package.json +0 -42
- package/dist/node_modules/wide-align/node_modules/string-width/index.js +0 -47
- package/dist/node_modules/wide-align/node_modules/string-width/license +0 -9
- package/dist/node_modules/wide-align/node_modules/string-width/package.json +0 -56
- package/dist/node_modules/wide-align/node_modules/strip-ansi/index.js +0 -4
- package/dist/node_modules/wide-align/node_modules/strip-ansi/license +0 -9
- package/dist/node_modules/wide-align/node_modules/strip-ansi/package.json +0 -54
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
'use strict'
|
|
2
|
-
var objectAssign = require('object-assign')
|
|
3
2
|
|
|
4
3
|
module.exports = function () {
|
|
5
4
|
return ThemeSetProto.newThemeSet()
|
|
@@ -14,7 +13,7 @@ ThemeSetProto.newTheme = function (parent, theme) {
|
|
|
14
13
|
theme = parent
|
|
15
14
|
parent = this.baseTheme
|
|
16
15
|
}
|
|
17
|
-
return
|
|
16
|
+
return Object.assign({}, parent, theme)
|
|
18
17
|
}
|
|
19
18
|
|
|
20
19
|
ThemeSetProto.getThemeNames = function () {
|
|
@@ -28,13 +27,15 @@ ThemeSetProto.addTheme = function (name, parent, theme) {
|
|
|
28
27
|
ThemeSetProto.addToAllThemes = function (theme) {
|
|
29
28
|
var themes = this.themes
|
|
30
29
|
Object.keys(themes).forEach(function (name) {
|
|
31
|
-
|
|
30
|
+
Object.assign(themes[name], theme)
|
|
32
31
|
})
|
|
33
|
-
|
|
32
|
+
Object.assign(this.baseTheme, theme)
|
|
34
33
|
}
|
|
35
34
|
|
|
36
35
|
ThemeSetProto.getTheme = function (name) {
|
|
37
|
-
if (!this.themes[name])
|
|
36
|
+
if (!this.themes[name]) {
|
|
37
|
+
throw this.newMissingThemeError(name)
|
|
38
|
+
}
|
|
38
39
|
return this.themes[name]
|
|
39
40
|
}
|
|
40
41
|
|
|
@@ -46,17 +47,23 @@ ThemeSetProto.setDefault = function (opts, name) {
|
|
|
46
47
|
var platform = opts.platform == null ? 'fallback' : opts.platform
|
|
47
48
|
var hasUnicode = !!opts.hasUnicode
|
|
48
49
|
var hasColor = !!opts.hasColor
|
|
49
|
-
if (!this.defaults[platform])
|
|
50
|
+
if (!this.defaults[platform]) {
|
|
51
|
+
this.defaults[platform] = { true: {}, false: {} }
|
|
52
|
+
}
|
|
50
53
|
this.defaults[platform][hasUnicode][hasColor] = name
|
|
51
54
|
}
|
|
52
55
|
|
|
53
56
|
ThemeSetProto.getDefault = function (opts) {
|
|
54
|
-
if (!opts)
|
|
57
|
+
if (!opts) {
|
|
58
|
+
opts = {}
|
|
59
|
+
}
|
|
55
60
|
var platformName = opts.platform || process.platform
|
|
56
61
|
var platform = this.defaults[platformName] || this.defaults.fallback
|
|
57
62
|
var hasUnicode = !!opts.hasUnicode
|
|
58
63
|
var hasColor = !!opts.hasColor
|
|
59
|
-
if (!platform)
|
|
64
|
+
if (!platform) {
|
|
65
|
+
throw this.newMissingDefaultThemeError(platformName, hasUnicode, hasColor)
|
|
66
|
+
}
|
|
60
67
|
if (!platform[hasUnicode][hasColor]) {
|
|
61
68
|
if (hasUnicode && hasColor && platform[!hasUnicode][hasColor]) {
|
|
62
69
|
hasUnicode = false
|
|
@@ -76,7 +83,7 @@ ThemeSetProto.getDefault = function (opts) {
|
|
|
76
83
|
if (platform[hasUnicode][hasColor]) {
|
|
77
84
|
return this.getTheme(platform[hasUnicode][hasColor])
|
|
78
85
|
} else {
|
|
79
|
-
return this.getDefault(
|
|
86
|
+
return this.getDefault(Object.assign({}, opts, { platform: 'fallback' }))
|
|
80
87
|
}
|
|
81
88
|
}
|
|
82
89
|
|
|
@@ -88,28 +95,28 @@ ThemeSetProto.newMissingThemeError = function newMissingThemeError (name) {
|
|
|
88
95
|
return err
|
|
89
96
|
}
|
|
90
97
|
|
|
91
|
-
ThemeSetProto.newMissingDefaultThemeError =
|
|
92
|
-
|
|
93
|
-
|
|
98
|
+
ThemeSetProto.newMissingDefaultThemeError =
|
|
99
|
+
function newMissingDefaultThemeError (platformName, hasUnicode, hasColor) {
|
|
100
|
+
var err = new Error(
|
|
101
|
+
'Could not find a gauge theme for your platform/unicode/color use combo:\n' +
|
|
94
102
|
' platform = ' + platformName + '\n' +
|
|
95
103
|
' hasUnicode = ' + hasUnicode + '\n' +
|
|
96
104
|
' hasColor = ' + hasColor)
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
105
|
+
Error.captureStackTrace.call(err, newMissingDefaultThemeError)
|
|
106
|
+
err.platform = platformName
|
|
107
|
+
err.hasUnicode = hasUnicode
|
|
108
|
+
err.hasColor = hasColor
|
|
109
|
+
err.code = 'EMISSINGTHEME'
|
|
110
|
+
return err
|
|
111
|
+
}
|
|
104
112
|
|
|
105
113
|
ThemeSetProto.newThemeSet = function () {
|
|
106
114
|
var themeset = function (opts) {
|
|
107
115
|
return themeset.getDefault(opts)
|
|
108
116
|
}
|
|
109
|
-
return
|
|
110
|
-
themes:
|
|
111
|
-
baseTheme:
|
|
112
|
-
defaults: JSON.parse(JSON.stringify(this.defaults || {}))
|
|
117
|
+
return Object.assign(themeset, ThemeSetProto, {
|
|
118
|
+
themes: Object.assign({}, this.themes),
|
|
119
|
+
baseTheme: Object.assign({}, this.baseTheme),
|
|
120
|
+
defaults: JSON.parse(JSON.stringify(this.defaults || {})),
|
|
113
121
|
})
|
|
114
122
|
}
|
|
115
|
-
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
var color = require('console-control-strings').color
|
|
3
|
+
var ThemeSet = require('./theme-set.js')
|
|
4
|
+
|
|
5
|
+
var themes = module.exports = new ThemeSet()
|
|
6
|
+
|
|
7
|
+
themes.addTheme('ASCII', {
|
|
8
|
+
preProgressbar: '[',
|
|
9
|
+
postProgressbar: ']',
|
|
10
|
+
progressbarTheme: {
|
|
11
|
+
complete: '#',
|
|
12
|
+
remaining: '.',
|
|
13
|
+
},
|
|
14
|
+
activityIndicatorTheme: '-\\|/',
|
|
15
|
+
preSubsection: '>',
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
themes.addTheme('colorASCII', themes.getTheme('ASCII'), {
|
|
19
|
+
progressbarTheme: {
|
|
20
|
+
preComplete: color('bgBrightWhite', 'brightWhite'),
|
|
21
|
+
complete: '#',
|
|
22
|
+
postComplete: color('reset'),
|
|
23
|
+
preRemaining: color('bgBrightBlack', 'brightBlack'),
|
|
24
|
+
remaining: '.',
|
|
25
|
+
postRemaining: color('reset'),
|
|
26
|
+
},
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
themes.addTheme('brailleSpinner', {
|
|
30
|
+
preProgressbar: '⸨',
|
|
31
|
+
postProgressbar: '⸩',
|
|
32
|
+
progressbarTheme: {
|
|
33
|
+
complete: '#',
|
|
34
|
+
remaining: '⠂',
|
|
35
|
+
},
|
|
36
|
+
activityIndicatorTheme: '⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏',
|
|
37
|
+
preSubsection: '>',
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
themes.addTheme('colorBrailleSpinner', themes.getTheme('brailleSpinner'), {
|
|
41
|
+
progressbarTheme: {
|
|
42
|
+
preComplete: color('bgBrightWhite', 'brightWhite'),
|
|
43
|
+
complete: '#',
|
|
44
|
+
postComplete: color('reset'),
|
|
45
|
+
preRemaining: color('bgBrightBlack', 'brightBlack'),
|
|
46
|
+
remaining: '⠂',
|
|
47
|
+
postRemaining: color('reset'),
|
|
48
|
+
},
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
themes.setDefault({}, 'ASCII')
|
|
52
|
+
themes.setDefault({ hasColor: true }, 'colorASCII')
|
|
53
|
+
themes.setDefault({ platform: 'darwin', hasUnicode: true }, 'brailleSpinner')
|
|
54
|
+
themes.setDefault({ platform: 'darwin', hasUnicode: true, hasColor: true }, 'colorBrailleSpinner')
|
|
55
|
+
themes.setDefault({ platform: 'linux', hasUnicode: true }, 'brailleSpinner')
|
|
56
|
+
themes.setDefault({ platform: 'linux', hasUnicode: true, hasColor: true }, 'colorBrailleSpinner')
|
|
@@ -5,9 +5,15 @@ var stripAnsi = require('strip-ansi')
|
|
|
5
5
|
module.exports = wideTruncate
|
|
6
6
|
|
|
7
7
|
function wideTruncate (str, target) {
|
|
8
|
-
if (stringWidth(str) === 0)
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
if (stringWidth(str) === 0) {
|
|
9
|
+
return str
|
|
10
|
+
}
|
|
11
|
+
if (target <= 0) {
|
|
12
|
+
return ''
|
|
13
|
+
}
|
|
14
|
+
if (stringWidth(str) <= target) {
|
|
15
|
+
return str
|
|
16
|
+
}
|
|
11
17
|
|
|
12
18
|
// We compute the number of bytes of ansi sequences here and add
|
|
13
19
|
// that to our initial truncation to ensure that we don't slice one
|
|
@@ -1,63 +1,62 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gauge",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "A terminal based horizontal
|
|
5
|
-
"main": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
|
+
"description": "A terminal based horizontal gauge",
|
|
5
|
+
"main": "lib",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"test": "
|
|
8
|
-
"
|
|
7
|
+
"test": "tap",
|
|
8
|
+
"lint": "eslint '**/*.js'",
|
|
9
|
+
"postlint": "npm-template-check",
|
|
10
|
+
"lintfix": "npm run lint -- --fix",
|
|
11
|
+
"preversion": "npm test",
|
|
12
|
+
"postversion": "npm publish",
|
|
13
|
+
"prepublishOnly": "git push origin --follow-tags",
|
|
14
|
+
"snap": "tap",
|
|
15
|
+
"posttest": "npm run lint"
|
|
9
16
|
},
|
|
10
17
|
"repository": {
|
|
11
18
|
"type": "git",
|
|
12
|
-
"url": "https://github.com/
|
|
19
|
+
"url": "https://github.com/npm/gauge"
|
|
13
20
|
},
|
|
14
21
|
"keywords": [
|
|
15
22
|
"progressbar",
|
|
16
23
|
"progress",
|
|
17
24
|
"gauge"
|
|
18
25
|
],
|
|
19
|
-
"author": "
|
|
26
|
+
"author": "GitHub Inc.",
|
|
20
27
|
"license": "ISC",
|
|
21
28
|
"bugs": {
|
|
22
|
-
"url": "https://github.com/
|
|
29
|
+
"url": "https://github.com/npm/gauge/issues"
|
|
23
30
|
},
|
|
24
|
-
"homepage": "https://github.com/
|
|
31
|
+
"homepage": "https://github.com/npm/gauge",
|
|
25
32
|
"dependencies": {
|
|
26
|
-
"
|
|
33
|
+
"ansi-regex": "^5.0.1",
|
|
34
|
+
"aproba": "^1.0.3 || ^2.0.0",
|
|
35
|
+
"color-support": "^1.1.2",
|
|
27
36
|
"console-control-strings": "^1.0.0",
|
|
28
|
-
"has-unicode": "^2.0.
|
|
29
|
-
"object-assign": "^4.1.0",
|
|
37
|
+
"has-unicode": "^2.0.1",
|
|
30
38
|
"signal-exit": "^3.0.0",
|
|
31
|
-
"string-width": "^
|
|
32
|
-
"strip-ansi": "^
|
|
33
|
-
"wide-align": "^1.1.
|
|
39
|
+
"string-width": "^4.2.3",
|
|
40
|
+
"strip-ansi": "^6.0.1",
|
|
41
|
+
"wide-align": "^1.1.2"
|
|
34
42
|
},
|
|
35
43
|
"devDependencies": {
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"tap": "^5.7.2",
|
|
40
|
-
"through2": "^2.0.0"
|
|
44
|
+
"@npmcli/template-oss": "^2.3.0",
|
|
45
|
+
"readable-stream": "^3.6.0",
|
|
46
|
+
"tap": "^15.0.10"
|
|
41
47
|
},
|
|
42
48
|
"files": [
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"set-interval.js",
|
|
57
|
-
"spin.js",
|
|
58
|
-
"template-item.js",
|
|
59
|
-
"theme-set.js",
|
|
60
|
-
"themes.js",
|
|
61
|
-
"wide-truncate.js"
|
|
62
|
-
]
|
|
49
|
+
"bin",
|
|
50
|
+
"lib"
|
|
51
|
+
],
|
|
52
|
+
"engines": {
|
|
53
|
+
"node": "^12.13.0 || ^14.15.0 || >=16"
|
|
54
|
+
},
|
|
55
|
+
"tap": {
|
|
56
|
+
"branches": 79,
|
|
57
|
+
"statements": 89,
|
|
58
|
+
"functions": 92,
|
|
59
|
+
"lines": 90
|
|
60
|
+
},
|
|
61
|
+
"templateVersion": "2.3.0"
|
|
63
62
|
}
|
|
@@ -1,46 +1,50 @@
|
|
|
1
|
+
/* eslint-disable yoda */
|
|
1
2
|
'use strict';
|
|
2
|
-
var numberIsNan = require('number-is-nan');
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
if (
|
|
4
|
+
const isFullwidthCodePoint = codePoint => {
|
|
5
|
+
if (Number.isNaN(codePoint)) {
|
|
6
6
|
return false;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
//
|
|
10
|
-
|
|
11
|
-
// code points are derived from:
|
|
9
|
+
// Code points are derived from:
|
|
12
10
|
// http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt
|
|
13
|
-
if (
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
11
|
+
if (
|
|
12
|
+
codePoint >= 0x1100 && (
|
|
13
|
+
codePoint <= 0x115F || // Hangul Jamo
|
|
14
|
+
codePoint === 0x2329 || // LEFT-POINTING ANGLE BRACKET
|
|
15
|
+
codePoint === 0x232A || // RIGHT-POINTING ANGLE BRACKET
|
|
16
|
+
// CJK Radicals Supplement .. Enclosed CJK Letters and Months
|
|
17
|
+
(0x2E80 <= codePoint && codePoint <= 0x3247 && codePoint !== 0x303F) ||
|
|
18
|
+
// Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
|
|
19
|
+
(0x3250 <= codePoint && codePoint <= 0x4DBF) ||
|
|
20
|
+
// CJK Unified Ideographs .. Yi Radicals
|
|
21
|
+
(0x4E00 <= codePoint && codePoint <= 0xA4C6) ||
|
|
22
|
+
// Hangul Jamo Extended-A
|
|
23
|
+
(0xA960 <= codePoint && codePoint <= 0xA97C) ||
|
|
24
|
+
// Hangul Syllables
|
|
25
|
+
(0xAC00 <= codePoint && codePoint <= 0xD7A3) ||
|
|
26
|
+
// CJK Compatibility Ideographs
|
|
27
|
+
(0xF900 <= codePoint && codePoint <= 0xFAFF) ||
|
|
28
|
+
// Vertical Forms
|
|
29
|
+
(0xFE10 <= codePoint && codePoint <= 0xFE19) ||
|
|
30
|
+
// CJK Compatibility Forms .. Small Form Variants
|
|
31
|
+
(0xFE30 <= codePoint && codePoint <= 0xFE6B) ||
|
|
32
|
+
// Halfwidth and Fullwidth Forms
|
|
33
|
+
(0xFF01 <= codePoint && codePoint <= 0xFF60) ||
|
|
34
|
+
(0xFFE0 <= codePoint && codePoint <= 0xFFE6) ||
|
|
35
|
+
// Kana Supplement
|
|
36
|
+
(0x1B000 <= codePoint && codePoint <= 0x1B001) ||
|
|
37
|
+
// Enclosed Ideographic Supplement
|
|
38
|
+
(0x1F200 <= codePoint && codePoint <= 0x1F251) ||
|
|
39
|
+
// CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
|
|
40
|
+
(0x20000 <= codePoint && codePoint <= 0x3FFFD)
|
|
41
|
+
)
|
|
42
|
+
) {
|
|
42
43
|
return true;
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
return false;
|
|
46
|
-
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
module.exports = isFullwidthCodePoint;
|
|
50
|
+
module.exports.default = isFullwidthCodePoint;
|
|
@@ -1,21 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
MIT License
|
|
2
2
|
|
|
3
3
|
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
4
4
|
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
11
6
|
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
14
8
|
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -1,45 +1,42 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"ava": "0.0.4",
|
|
43
|
-
"code-point-at": "^1.0.0"
|
|
44
|
-
}
|
|
2
|
+
"name": "is-fullwidth-code-point",
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"description": "Check if the character represented by a given Unicode code point is fullwidth",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": "sindresorhus/is-fullwidth-code-point",
|
|
7
|
+
"author": {
|
|
8
|
+
"name": "Sindre Sorhus",
|
|
9
|
+
"email": "sindresorhus@gmail.com",
|
|
10
|
+
"url": "sindresorhus.com"
|
|
11
|
+
},
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=8"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"test": "xo && ava && tsd-check"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"index.js",
|
|
20
|
+
"index.d.ts"
|
|
21
|
+
],
|
|
22
|
+
"keywords": [
|
|
23
|
+
"fullwidth",
|
|
24
|
+
"full-width",
|
|
25
|
+
"full",
|
|
26
|
+
"width",
|
|
27
|
+
"unicode",
|
|
28
|
+
"character",
|
|
29
|
+
"string",
|
|
30
|
+
"codepoint",
|
|
31
|
+
"code",
|
|
32
|
+
"point",
|
|
33
|
+
"is",
|
|
34
|
+
"detect",
|
|
35
|
+
"check"
|
|
36
|
+
],
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"ava": "^1.3.1",
|
|
39
|
+
"tsd-check": "^0.5.0",
|
|
40
|
+
"xo": "^0.24.0"
|
|
41
|
+
}
|
|
45
42
|
}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"bindings",
|
|
12
12
|
"gyp"
|
|
13
13
|
],
|
|
14
|
-
"version": "8.4.
|
|
14
|
+
"version": "8.4.1",
|
|
15
15
|
"installVersion": 9,
|
|
16
16
|
"author": "Nathan Rajlich <nathan@tootallnate.net> (http://tootallnate.net)",
|
|
17
17
|
"repository": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"graceful-fs": "^4.2.6",
|
|
28
28
|
"make-fetch-happen": "^9.1.0",
|
|
29
29
|
"nopt": "^5.0.0",
|
|
30
|
-
"npmlog": "^
|
|
30
|
+
"npmlog": "^6.0.0",
|
|
31
31
|
"rimraf": "^3.0.2",
|
|
32
32
|
"semver": "^7.3.5",
|
|
33
33
|
"tar": "^6.1.2",
|