@node-core/utils 7.2.0 → 7.2.1
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/lib/ci/build-types/test_build.js +3 -3
- package/lib/ci/failure_aggregator.js +2 -2
- package/lib/ci/run_ci.js +3 -2
- package/lib/cli.js +6 -6
- package/lib/figures.js +6 -6
- package/lib/update-v8/backport.js +3 -4
- package/lib/verbosity.js +2 -4
- package/node_modules/@listr2/{prompt-adapter-enquirer → prompt-adapter-inquirer}/README.md +4 -4
- package/node_modules/@listr2/prompt-adapter-inquirer/dist/index.d.mts +21 -0
- package/node_modules/@listr2/prompt-adapter-inquirer/dist/index.mjs +46 -0
- package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/LICENSE +22 -0
- package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/dist/index.d.ts +2 -0
- package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/dist/index.js +2 -0
- package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/dist/inquirer.d.ts +35 -0
- package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/dist/inquirer.js +1 -0
- package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/dist/utils.d.ts +34 -0
- package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/dist/utils.js +2 -0
- package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/package.json +88 -0
- package/node_modules/@listr2/{prompt-adapter-enquirer → prompt-adapter-inquirer}/package.json +25 -20
- package/node_modules/{log-update/node_modules/ansi-escapes → ansi-escapes}/base.d.ts +48 -3
- package/node_modules/{log-update/node_modules/ansi-escapes → ansi-escapes}/base.js +58 -19
- package/node_modules/{log-update/node_modules/ansi-escapes → ansi-escapes}/package.json +1 -1
- package/node_modules/{log-update/node_modules/ansi-escapes → ansi-escapes}/readme.md +36 -1
- package/node_modules/ansi-regex/index.js +9 -4
- package/node_modules/ansi-regex/package.json +1 -1
- package/node_modules/ansi-regex/readme.md +6 -0
- package/node_modules/ansi-styles/index.d.ts +12 -12
- package/node_modules/ansi-styles/index.js +3 -3
- package/node_modules/ansi-styles/package.json +4 -4
- package/node_modules/cli-truncate/index.d.ts +3 -3
- package/node_modules/cli-truncate/index.js +40 -14
- package/node_modules/cli-truncate/node_modules/string-width/index.js +133 -15
- package/node_modules/cli-truncate/node_modules/string-width/package.json +4 -4
- package/node_modules/cli-truncate/node_modules/string-width/readme.md +1 -1
- package/node_modules/cli-truncate/package.json +7 -7
- package/node_modules/cli-truncate/readme.md +2 -3
- package/node_modules/ghauth/.github/dependabot.yml +11 -3
- package/node_modules/ghauth/.github/workflows/depsound.yml +33 -0
- package/node_modules/ghauth/.github/workflows/test-and-release.yml +4 -4
- package/node_modules/ghauth/CHANGELOG.md +60 -0
- package/node_modules/ghauth/package.json +30 -6
- package/node_modules/js-yaml/README.md +20 -187
- package/node_modules/js-yaml/dist/browser/js-yaml.esm.min.mjs +1008 -946
- package/node_modules/js-yaml/dist/browser/js-yaml.esm.min.mjs.map +1 -1
- package/node_modules/js-yaml/dist/browser/js-yaml.umd.min.js +29 -23
- package/node_modules/js-yaml/dist/browser/js-yaml.umd.min.js.map +1 -1
- package/node_modules/js-yaml/dist/js-yaml.cjs.js +1043 -583
- package/node_modules/js-yaml/dist/js-yaml.cjs.js.map +1 -1
- package/node_modules/js-yaml/dist/js-yaml.d.ts +877 -133
- package/node_modules/js-yaml/dist/js-yaml.mjs +995 -556
- package/node_modules/js-yaml/dist/js-yaml.mjs.map +1 -1
- package/node_modules/js-yaml/package.json +8 -7
- package/node_modules/listr2/dist/{index.d.cts → index.d.mts} +90 -60
- package/node_modules/listr2/dist/{index.js → index.mjs} +496 -373
- package/node_modules/listr2/node_modules/string-width/index.d.ts +39 -0
- package/node_modules/listr2/node_modules/string-width/index.js +207 -0
- package/node_modules/listr2/node_modules/string-width/package.json +65 -0
- package/node_modules/listr2/node_modules/string-width/readme.md +66 -0
- package/node_modules/listr2/node_modules/wrap-ansi/index.d.ts +1 -1
- package/node_modules/listr2/node_modules/wrap-ansi/index.js +544 -116
- package/node_modules/listr2/node_modules/wrap-ansi/package.json +10 -13
- package/node_modules/listr2/node_modules/wrap-ansi/readme.md +2 -0
- package/node_modules/listr2/package.json +16 -19
- package/node_modules/log-update/index.d.ts +64 -1
- package/node_modules/log-update/index.js +268 -18
- package/node_modules/log-update/node_modules/string-width/index.d.ts +39 -0
- package/node_modules/log-update/node_modules/string-width/index.js +207 -0
- package/node_modules/log-update/node_modules/string-width/package.json +65 -0
- package/node_modules/log-update/node_modules/string-width/readme.md +66 -0
- package/node_modules/log-update/node_modules/wrap-ansi/index.d.ts +1 -1
- package/node_modules/log-update/node_modules/wrap-ansi/index.js +544 -116
- package/node_modules/log-update/node_modules/wrap-ansi/package.json +10 -13
- package/node_modules/log-update/node_modules/wrap-ansi/readme.md +2 -0
- package/node_modules/log-update/package.json +14 -12
- package/node_modules/log-update/readme.md +61 -0
- package/node_modules/slice-ansi/index.d.ts +2 -2
- package/node_modules/slice-ansi/index.js +260 -112
- package/node_modules/slice-ansi/package.json +10 -9
- package/node_modules/slice-ansi/readme.md +3 -2
- package/node_modules/slice-ansi/tokenize-ansi.js +752 -0
- package/node_modules/smol-toml/README.md +205 -191
- package/node_modules/smol-toml/dist/date.d.ts +0 -1
- package/node_modules/smol-toml/dist/date.js +0 -1
- package/node_modules/smol-toml/dist/error.d.ts +0 -1
- package/node_modules/smol-toml/dist/error.js +0 -1
- package/node_modules/smol-toml/dist/extract.js +32 -65
- package/node_modules/smol-toml/dist/index.cjs +302 -288
- package/node_modules/smol-toml/dist/index.d.ts +0 -1
- package/node_modules/smol-toml/dist/index.js +0 -1
- package/node_modules/smol-toml/dist/parse.d.ts +1 -3
- package/node_modules/smol-toml/dist/parse.js +22 -21
- package/node_modules/smol-toml/dist/primitive.js +75 -76
- package/node_modules/smol-toml/dist/stringify.d.ts +0 -1
- package/node_modules/smol-toml/dist/stringify.js +43 -30
- package/node_modules/smol-toml/dist/struct.js +90 -93
- package/node_modules/smol-toml/dist/util.d.ts +1 -1
- package/node_modules/smol-toml/dist/util.js +36 -39
- package/node_modules/smol-toml/package.json +6 -6
- package/node_modules/strip-ansi/index.js +5 -0
- package/node_modules/strip-ansi/package.json +5 -5
- package/package.json +3 -5
- package/node_modules/@listr2/prompt-adapter-enquirer/dist/index.cjs +0 -127
- package/node_modules/@listr2/prompt-adapter-enquirer/dist/index.d.cts +0 -152
- package/node_modules/@listr2/prompt-adapter-enquirer/dist/index.d.ts +0 -152
- package/node_modules/@listr2/prompt-adapter-enquirer/dist/index.js +0 -92
- package/node_modules/chalk/package.json +0 -92
- package/node_modules/chalk/readme.md +0 -331
- package/node_modules/chalk/source/index.d.ts +0 -437
- package/node_modules/chalk/source/index.js +0 -261
- package/node_modules/chalk/source/utilities.js +0 -33
- package/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +0 -299
- package/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -261
- package/node_modules/chalk/source/vendor/supports-color/browser.d.ts +0 -1
- package/node_modules/chalk/source/vendor/supports-color/browser.js +0 -32
- package/node_modules/chalk/source/vendor/supports-color/index.d.ts +0 -55
- package/node_modules/chalk/source/vendor/supports-color/index.js +0 -206
- package/node_modules/colorette/LICENSE.md +0 -7
- package/node_modules/colorette/README.md +0 -134
- package/node_modules/colorette/index.cjs +0 -218
- package/node_modules/colorette/index.d.ts +0 -93
- package/node_modules/colorette/index.js +0 -150
- package/node_modules/colorette/package.json +0 -40
- package/node_modules/eventemitter3/LICENSE +0 -21
- package/node_modules/eventemitter3/README.md +0 -94
- package/node_modules/eventemitter3/dist/eventemitter3.esm.js +0 -347
- package/node_modules/eventemitter3/dist/eventemitter3.esm.min.js +0 -1
- package/node_modules/eventemitter3/dist/eventemitter3.esm.min.js.map +0 -1
- package/node_modules/eventemitter3/dist/eventemitter3.umd.js +0 -355
- package/node_modules/eventemitter3/dist/eventemitter3.umd.min.js +0 -1
- package/node_modules/eventemitter3/dist/eventemitter3.umd.min.js.map +0 -1
- package/node_modules/eventemitter3/index.d.ts +0 -135
- package/node_modules/eventemitter3/index.js +0 -336
- package/node_modules/eventemitter3/index.mjs +0 -4
- package/node_modules/eventemitter3/package.json +0 -67
- package/node_modules/figures/index.d.ts +0 -279
- package/node_modules/figures/index.js +0 -292
- package/node_modules/figures/package.json +0 -49
- package/node_modules/figures/readme.md +0 -337
- package/node_modules/listr2/dist/index.cjs +0 -2189
- package/node_modules/listr2/dist/index.d.ts +0 -1528
- package/node_modules/rfdc/.github/workflows/ci.yml +0 -21
- package/node_modules/rfdc/LICENSE +0 -15
- package/node_modules/rfdc/default.js +0 -3
- package/node_modules/rfdc/index.d.ts +0 -13
- package/node_modules/rfdc/index.js +0 -198
- package/node_modules/rfdc/index.test-d.ts +0 -13
- package/node_modules/rfdc/package.json +0 -73
- package/node_modules/rfdc/readme.md +0 -181
- package/node_modules/rfdc/test/index.js +0 -306
- package/node_modules/smol-toml/dist/date.d.ts.map +0 -1
- package/node_modules/smol-toml/dist/date.js.map +0 -1
- package/node_modules/smol-toml/dist/error.d.ts.map +0 -1
- package/node_modules/smol-toml/dist/error.js.map +0 -1
- package/node_modules/smol-toml/dist/extract.js.map +0 -1
- package/node_modules/smol-toml/dist/index.cjs.map +0 -1
- package/node_modules/smol-toml/dist/index.d.ts.map +0 -1
- package/node_modules/smol-toml/dist/index.js.map +0 -1
- package/node_modules/smol-toml/dist/parse.d.ts.map +0 -1
- package/node_modules/smol-toml/dist/parse.js.map +0 -1
- package/node_modules/smol-toml/dist/primitive.d.ts +0 -29
- package/node_modules/smol-toml/dist/primitive.d.ts.map +0 -1
- package/node_modules/smol-toml/dist/primitive.js.map +0 -1
- package/node_modules/smol-toml/dist/stringify.d.ts.map +0 -1
- package/node_modules/smol-toml/dist/stringify.js.map +0 -1
- package/node_modules/smol-toml/dist/struct.js.map +0 -1
- package/node_modules/smol-toml/dist/util.d.ts.map +0 -1
- package/node_modules/smol-toml/dist/util.js.map +0 -1
- package/node_modules/smol-toml/src/date.ts +0 -152
- package/node_modules/smol-toml/src/error.ts +0 -77
- package/node_modules/smol-toml/src/extract.ts +0 -113
- package/node_modules/smol-toml/src/index.ts +0 -42
- package/node_modules/smol-toml/src/parse.ts +0 -184
- package/node_modules/smol-toml/src/primitive.ts +0 -249
- package/node_modules/smol-toml/src/stringify.ts +0 -191
- package/node_modules/smol-toml/src/struct.ts +0 -202
- package/node_modules/smol-toml/src/util.ts +0 -106
- /package/node_modules/@listr2/{prompt-adapter-enquirer → prompt-adapter-inquirer}/LICENSE +0 -0
- /package/node_modules/{log-update/node_modules/ansi-escapes → ansi-escapes}/index.d.ts +0 -0
- /package/node_modules/{log-update/node_modules/ansi-escapes → ansi-escapes}/index.js +0 -0
- /package/node_modules/{chalk → ansi-escapes}/license +0 -0
- /package/node_modules/{figures → listr2/node_modules/string-width}/license +0 -0
- /package/node_modules/log-update/node_modules/{ansi-escapes → string-width}/license +0 -0
|
@@ -1,336 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var has = Object.prototype.hasOwnProperty
|
|
4
|
-
, prefix = '~';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Constructor to create a storage for our `EE` objects.
|
|
8
|
-
* An `Events` instance is a plain object whose properties are event names.
|
|
9
|
-
*
|
|
10
|
-
* @constructor
|
|
11
|
-
* @private
|
|
12
|
-
*/
|
|
13
|
-
function Events() {}
|
|
14
|
-
|
|
15
|
-
//
|
|
16
|
-
// We try to not inherit from `Object.prototype`. In some engines creating an
|
|
17
|
-
// instance in this way is faster than calling `Object.create(null)` directly.
|
|
18
|
-
// If `Object.create(null)` is not supported we prefix the event names with a
|
|
19
|
-
// character to make sure that the built-in object properties are not
|
|
20
|
-
// overridden or used as an attack vector.
|
|
21
|
-
//
|
|
22
|
-
if (Object.create) {
|
|
23
|
-
Events.prototype = Object.create(null);
|
|
24
|
-
|
|
25
|
-
//
|
|
26
|
-
// This hack is needed because the `__proto__` property is still inherited in
|
|
27
|
-
// some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.
|
|
28
|
-
//
|
|
29
|
-
if (!new Events().__proto__) prefix = false;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Representation of a single event listener.
|
|
34
|
-
*
|
|
35
|
-
* @param {Function} fn The listener function.
|
|
36
|
-
* @param {*} context The context to invoke the listener with.
|
|
37
|
-
* @param {Boolean} [once=false] Specify if the listener is a one-time listener.
|
|
38
|
-
* @constructor
|
|
39
|
-
* @private
|
|
40
|
-
*/
|
|
41
|
-
function EE(fn, context, once) {
|
|
42
|
-
this.fn = fn;
|
|
43
|
-
this.context = context;
|
|
44
|
-
this.once = once || false;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Add a listener for a given event.
|
|
49
|
-
*
|
|
50
|
-
* @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
|
|
51
|
-
* @param {(String|Symbol)} event The event name.
|
|
52
|
-
* @param {Function} fn The listener function.
|
|
53
|
-
* @param {*} context The context to invoke the listener with.
|
|
54
|
-
* @param {Boolean} once Specify if the listener is a one-time listener.
|
|
55
|
-
* @returns {EventEmitter}
|
|
56
|
-
* @private
|
|
57
|
-
*/
|
|
58
|
-
function addListener(emitter, event, fn, context, once) {
|
|
59
|
-
if (typeof fn !== 'function') {
|
|
60
|
-
throw new TypeError('The listener must be a function');
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
var listener = new EE(fn, context || emitter, once)
|
|
64
|
-
, evt = prefix ? prefix + event : event;
|
|
65
|
-
|
|
66
|
-
if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;
|
|
67
|
-
else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);
|
|
68
|
-
else emitter._events[evt] = [emitter._events[evt], listener];
|
|
69
|
-
|
|
70
|
-
return emitter;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Clear event by name.
|
|
75
|
-
*
|
|
76
|
-
* @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
|
|
77
|
-
* @param {(String|Symbol)} evt The Event name.
|
|
78
|
-
* @private
|
|
79
|
-
*/
|
|
80
|
-
function clearEvent(emitter, evt) {
|
|
81
|
-
if (--emitter._eventsCount === 0) emitter._events = new Events();
|
|
82
|
-
else delete emitter._events[evt];
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Minimal `EventEmitter` interface that is molded against the Node.js
|
|
87
|
-
* `EventEmitter` interface.
|
|
88
|
-
*
|
|
89
|
-
* @constructor
|
|
90
|
-
* @public
|
|
91
|
-
*/
|
|
92
|
-
function EventEmitter() {
|
|
93
|
-
this._events = new Events();
|
|
94
|
-
this._eventsCount = 0;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Return an array listing the events for which the emitter has registered
|
|
99
|
-
* listeners.
|
|
100
|
-
*
|
|
101
|
-
* @returns {Array}
|
|
102
|
-
* @public
|
|
103
|
-
*/
|
|
104
|
-
EventEmitter.prototype.eventNames = function eventNames() {
|
|
105
|
-
var names = []
|
|
106
|
-
, events
|
|
107
|
-
, name;
|
|
108
|
-
|
|
109
|
-
if (this._eventsCount === 0) return names;
|
|
110
|
-
|
|
111
|
-
for (name in (events = this._events)) {
|
|
112
|
-
if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
if (Object.getOwnPropertySymbols) {
|
|
116
|
-
return names.concat(Object.getOwnPropertySymbols(events));
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
return names;
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Return the listeners registered for a given event.
|
|
124
|
-
*
|
|
125
|
-
* @param {(String|Symbol)} event The event name.
|
|
126
|
-
* @returns {Array} The registered listeners.
|
|
127
|
-
* @public
|
|
128
|
-
*/
|
|
129
|
-
EventEmitter.prototype.listeners = function listeners(event) {
|
|
130
|
-
var evt = prefix ? prefix + event : event
|
|
131
|
-
, handlers = this._events[evt];
|
|
132
|
-
|
|
133
|
-
if (!handlers) return [];
|
|
134
|
-
if (handlers.fn) return [handlers.fn];
|
|
135
|
-
|
|
136
|
-
for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {
|
|
137
|
-
ee[i] = handlers[i].fn;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
return ee;
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* Return the number of listeners listening to a given event.
|
|
145
|
-
*
|
|
146
|
-
* @param {(String|Symbol)} event The event name.
|
|
147
|
-
* @returns {Number} The number of listeners.
|
|
148
|
-
* @public
|
|
149
|
-
*/
|
|
150
|
-
EventEmitter.prototype.listenerCount = function listenerCount(event) {
|
|
151
|
-
var evt = prefix ? prefix + event : event
|
|
152
|
-
, listeners = this._events[evt];
|
|
153
|
-
|
|
154
|
-
if (!listeners) return 0;
|
|
155
|
-
if (listeners.fn) return 1;
|
|
156
|
-
return listeners.length;
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* Calls each of the listeners registered for a given event.
|
|
161
|
-
*
|
|
162
|
-
* @param {(String|Symbol)} event The event name.
|
|
163
|
-
* @returns {Boolean} `true` if the event had listeners, else `false`.
|
|
164
|
-
* @public
|
|
165
|
-
*/
|
|
166
|
-
EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {
|
|
167
|
-
var evt = prefix ? prefix + event : event;
|
|
168
|
-
|
|
169
|
-
if (!this._events[evt]) return false;
|
|
170
|
-
|
|
171
|
-
var listeners = this._events[evt]
|
|
172
|
-
, len = arguments.length
|
|
173
|
-
, args
|
|
174
|
-
, i;
|
|
175
|
-
|
|
176
|
-
if (listeners.fn) {
|
|
177
|
-
if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);
|
|
178
|
-
|
|
179
|
-
switch (len) {
|
|
180
|
-
case 1: return listeners.fn.call(listeners.context), true;
|
|
181
|
-
case 2: return listeners.fn.call(listeners.context, a1), true;
|
|
182
|
-
case 3: return listeners.fn.call(listeners.context, a1, a2), true;
|
|
183
|
-
case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;
|
|
184
|
-
case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;
|
|
185
|
-
case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
for (i = 1, args = new Array(len -1); i < len; i++) {
|
|
189
|
-
args[i - 1] = arguments[i];
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
listeners.fn.apply(listeners.context, args);
|
|
193
|
-
} else {
|
|
194
|
-
var length = listeners.length
|
|
195
|
-
, j;
|
|
196
|
-
|
|
197
|
-
for (i = 0; i < length; i++) {
|
|
198
|
-
if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);
|
|
199
|
-
|
|
200
|
-
switch (len) {
|
|
201
|
-
case 1: listeners[i].fn.call(listeners[i].context); break;
|
|
202
|
-
case 2: listeners[i].fn.call(listeners[i].context, a1); break;
|
|
203
|
-
case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;
|
|
204
|
-
case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;
|
|
205
|
-
default:
|
|
206
|
-
if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {
|
|
207
|
-
args[j - 1] = arguments[j];
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
listeners[i].fn.apply(listeners[i].context, args);
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
return true;
|
|
216
|
-
};
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* Add a listener for a given event.
|
|
220
|
-
*
|
|
221
|
-
* @param {(String|Symbol)} event The event name.
|
|
222
|
-
* @param {Function} fn The listener function.
|
|
223
|
-
* @param {*} [context=this] The context to invoke the listener with.
|
|
224
|
-
* @returns {EventEmitter} `this`.
|
|
225
|
-
* @public
|
|
226
|
-
*/
|
|
227
|
-
EventEmitter.prototype.on = function on(event, fn, context) {
|
|
228
|
-
return addListener(this, event, fn, context, false);
|
|
229
|
-
};
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* Add a one-time listener for a given event.
|
|
233
|
-
*
|
|
234
|
-
* @param {(String|Symbol)} event The event name.
|
|
235
|
-
* @param {Function} fn The listener function.
|
|
236
|
-
* @param {*} [context=this] The context to invoke the listener with.
|
|
237
|
-
* @returns {EventEmitter} `this`.
|
|
238
|
-
* @public
|
|
239
|
-
*/
|
|
240
|
-
EventEmitter.prototype.once = function once(event, fn, context) {
|
|
241
|
-
return addListener(this, event, fn, context, true);
|
|
242
|
-
};
|
|
243
|
-
|
|
244
|
-
/**
|
|
245
|
-
* Remove the listeners of a given event.
|
|
246
|
-
*
|
|
247
|
-
* @param {(String|Symbol)} event The event name.
|
|
248
|
-
* @param {Function} fn Only remove the listeners that match this function.
|
|
249
|
-
* @param {*} context Only remove the listeners that have this context.
|
|
250
|
-
* @param {Boolean} once Only remove one-time listeners.
|
|
251
|
-
* @returns {EventEmitter} `this`.
|
|
252
|
-
* @public
|
|
253
|
-
*/
|
|
254
|
-
EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {
|
|
255
|
-
var evt = prefix ? prefix + event : event;
|
|
256
|
-
|
|
257
|
-
if (!this._events[evt]) return this;
|
|
258
|
-
if (!fn) {
|
|
259
|
-
clearEvent(this, evt);
|
|
260
|
-
return this;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
var listeners = this._events[evt];
|
|
264
|
-
|
|
265
|
-
if (listeners.fn) {
|
|
266
|
-
if (
|
|
267
|
-
listeners.fn === fn &&
|
|
268
|
-
(!once || listeners.once) &&
|
|
269
|
-
(!context || listeners.context === context)
|
|
270
|
-
) {
|
|
271
|
-
clearEvent(this, evt);
|
|
272
|
-
}
|
|
273
|
-
} else {
|
|
274
|
-
for (var i = 0, events = [], length = listeners.length; i < length; i++) {
|
|
275
|
-
if (
|
|
276
|
-
listeners[i].fn !== fn ||
|
|
277
|
-
(once && !listeners[i].once) ||
|
|
278
|
-
(context && listeners[i].context !== context)
|
|
279
|
-
) {
|
|
280
|
-
events.push(listeners[i]);
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
//
|
|
285
|
-
// Reset the array, or remove it completely if we have no more listeners.
|
|
286
|
-
//
|
|
287
|
-
if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;
|
|
288
|
-
else clearEvent(this, evt);
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
return this;
|
|
292
|
-
};
|
|
293
|
-
|
|
294
|
-
/**
|
|
295
|
-
* Remove all listeners, or those of the specified event.
|
|
296
|
-
*
|
|
297
|
-
* @param {(String|Symbol)} [event] The event name.
|
|
298
|
-
* @returns {EventEmitter} `this`.
|
|
299
|
-
* @public
|
|
300
|
-
*/
|
|
301
|
-
EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {
|
|
302
|
-
var evt;
|
|
303
|
-
|
|
304
|
-
if (event) {
|
|
305
|
-
evt = prefix ? prefix + event : event;
|
|
306
|
-
if (this._events[evt]) clearEvent(this, evt);
|
|
307
|
-
} else {
|
|
308
|
-
this._events = new Events();
|
|
309
|
-
this._eventsCount = 0;
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
return this;
|
|
313
|
-
};
|
|
314
|
-
|
|
315
|
-
//
|
|
316
|
-
// Alias methods names because people roll like that.
|
|
317
|
-
//
|
|
318
|
-
EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
|
|
319
|
-
EventEmitter.prototype.addListener = EventEmitter.prototype.on;
|
|
320
|
-
|
|
321
|
-
//
|
|
322
|
-
// Expose the prefix.
|
|
323
|
-
//
|
|
324
|
-
EventEmitter.prefixed = prefix;
|
|
325
|
-
|
|
326
|
-
//
|
|
327
|
-
// Allow `EventEmitter` to be imported as module namespace.
|
|
328
|
-
//
|
|
329
|
-
EventEmitter.EventEmitter = EventEmitter;
|
|
330
|
-
|
|
331
|
-
//
|
|
332
|
-
// Expose the module.
|
|
333
|
-
//
|
|
334
|
-
if ('undefined' !== typeof module) {
|
|
335
|
-
module.exports = EventEmitter;
|
|
336
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "eventemitter3",
|
|
3
|
-
"version": "5.0.1",
|
|
4
|
-
"description": "EventEmitter3 focuses on performance while maintaining a Node.js AND browser compatible interface.",
|
|
5
|
-
"exports": {
|
|
6
|
-
".": {
|
|
7
|
-
"types": "./index.d.ts",
|
|
8
|
-
"import": "./index.mjs",
|
|
9
|
-
"require": "./index.js"
|
|
10
|
-
},
|
|
11
|
-
"./package.json": "./package.json"
|
|
12
|
-
},
|
|
13
|
-
"main": "index.js",
|
|
14
|
-
"types": "index.d.ts",
|
|
15
|
-
"scripts": {
|
|
16
|
-
"rollup": "rimraf dist umd && rollup -c",
|
|
17
|
-
"benchmark": "find benchmarks/run -name '*.js' -exec benchmarks/start.sh {} \\;",
|
|
18
|
-
"test": "c8 --reporter=lcov --reporter=text mocha test/test.js",
|
|
19
|
-
"test-esm": "mocha test/test.mjs",
|
|
20
|
-
"prepublishOnly": "npm run rollup",
|
|
21
|
-
"test-browser": "node test/browser.js"
|
|
22
|
-
},
|
|
23
|
-
"files": [
|
|
24
|
-
"index.js",
|
|
25
|
-
"index.mjs",
|
|
26
|
-
"index.d.ts",
|
|
27
|
-
"dist"
|
|
28
|
-
],
|
|
29
|
-
"repository": {
|
|
30
|
-
"type": "git",
|
|
31
|
-
"url": "git://github.com/primus/eventemitter3.git"
|
|
32
|
-
},
|
|
33
|
-
"keywords": [
|
|
34
|
-
"EventEmitter",
|
|
35
|
-
"EventEmitter2",
|
|
36
|
-
"EventEmitter3",
|
|
37
|
-
"Events",
|
|
38
|
-
"addEventListener",
|
|
39
|
-
"addListener",
|
|
40
|
-
"emit",
|
|
41
|
-
"emits",
|
|
42
|
-
"emitter",
|
|
43
|
-
"event",
|
|
44
|
-
"once",
|
|
45
|
-
"pub/sub",
|
|
46
|
-
"publish",
|
|
47
|
-
"reactor",
|
|
48
|
-
"subscribe"
|
|
49
|
-
],
|
|
50
|
-
"author": "Arnout Kazemier",
|
|
51
|
-
"license": "MIT",
|
|
52
|
-
"bugs": {
|
|
53
|
-
"url": "https://github.com/primus/eventemitter3/issues"
|
|
54
|
-
},
|
|
55
|
-
"devDependencies": {
|
|
56
|
-
"@rollup/plugin-commonjs": "^24.0.0",
|
|
57
|
-
"@rollup/plugin-terser": "^0.4.0",
|
|
58
|
-
"assume": "^2.2.0",
|
|
59
|
-
"c8": "^7.3.1",
|
|
60
|
-
"mocha": "^10.0.0",
|
|
61
|
-
"pre-commit": "^1.2.0",
|
|
62
|
-
"rimraf": "^4.1.2",
|
|
63
|
-
"rollup": "^3.4.0",
|
|
64
|
-
"sauce-browsers": "^3.0.0",
|
|
65
|
-
"sauce-test": "^1.3.3"
|
|
66
|
-
}
|
|
67
|
-
}
|
|
@@ -1,279 +0,0 @@
|
|
|
1
|
-
declare const figureSet: {
|
|
2
|
-
readonly tick: string;
|
|
3
|
-
readonly info: string;
|
|
4
|
-
readonly warning: string;
|
|
5
|
-
readonly cross: string;
|
|
6
|
-
readonly square: string;
|
|
7
|
-
readonly squareSmall: string;
|
|
8
|
-
readonly squareSmallFilled: string;
|
|
9
|
-
readonly squareDarkShade: string;
|
|
10
|
-
readonly squareMediumShade: string;
|
|
11
|
-
readonly squareLightShade: string;
|
|
12
|
-
readonly squareTop: string;
|
|
13
|
-
readonly squareBottom: string;
|
|
14
|
-
readonly squareLeft: string;
|
|
15
|
-
readonly squareRight: string;
|
|
16
|
-
readonly squareCenter: string;
|
|
17
|
-
readonly circle: string;
|
|
18
|
-
readonly circleFilled: string;
|
|
19
|
-
readonly circleDotted: string;
|
|
20
|
-
readonly circleDouble: string;
|
|
21
|
-
readonly circleCircle: string;
|
|
22
|
-
readonly circleCross: string;
|
|
23
|
-
readonly circlePipe: string;
|
|
24
|
-
readonly circleQuestionMark: string;
|
|
25
|
-
readonly radioOn: string;
|
|
26
|
-
readonly radioOff: string;
|
|
27
|
-
readonly checkboxOn: string;
|
|
28
|
-
readonly checkboxOff: string;
|
|
29
|
-
readonly checkboxCircleOn: string;
|
|
30
|
-
readonly checkboxCircleOff: string;
|
|
31
|
-
readonly questionMarkPrefix: string;
|
|
32
|
-
readonly bullet: string;
|
|
33
|
-
readonly dot: string;
|
|
34
|
-
readonly ellipsis: string;
|
|
35
|
-
readonly pointer: string;
|
|
36
|
-
readonly pointerSmall: string;
|
|
37
|
-
readonly triangleUp: string;
|
|
38
|
-
readonly triangleUpSmall: string;
|
|
39
|
-
readonly triangleUpOutline: string;
|
|
40
|
-
readonly triangleDown: string;
|
|
41
|
-
readonly triangleDownSmall: string;
|
|
42
|
-
readonly triangleLeft: string;
|
|
43
|
-
readonly triangleLeftSmall: string;
|
|
44
|
-
readonly triangleRight: string;
|
|
45
|
-
readonly triangleRightSmall: string;
|
|
46
|
-
readonly lozenge: string;
|
|
47
|
-
readonly lozengeOutline: string;
|
|
48
|
-
readonly home: string;
|
|
49
|
-
readonly hamburger: string;
|
|
50
|
-
readonly smiley: string;
|
|
51
|
-
readonly mustache: string;
|
|
52
|
-
readonly heart: string;
|
|
53
|
-
readonly star: string;
|
|
54
|
-
readonly play: string;
|
|
55
|
-
readonly musicNote: string;
|
|
56
|
-
readonly musicNoteBeamed: string;
|
|
57
|
-
readonly nodejs: string;
|
|
58
|
-
readonly arrowUp: string;
|
|
59
|
-
readonly arrowDown: string;
|
|
60
|
-
readonly arrowLeft: string;
|
|
61
|
-
readonly arrowRight: string;
|
|
62
|
-
readonly arrowLeftRight: string;
|
|
63
|
-
readonly arrowUpDown: string;
|
|
64
|
-
readonly almostEqual: string;
|
|
65
|
-
readonly notEqual: string;
|
|
66
|
-
readonly lessOrEqual: string;
|
|
67
|
-
readonly greaterOrEqual: string;
|
|
68
|
-
readonly identical: string;
|
|
69
|
-
readonly infinity: string;
|
|
70
|
-
readonly subscriptZero: string;
|
|
71
|
-
readonly subscriptOne: string;
|
|
72
|
-
readonly subscriptTwo: string;
|
|
73
|
-
readonly subscriptThree: string;
|
|
74
|
-
readonly subscriptFour: string;
|
|
75
|
-
readonly subscriptFive: string;
|
|
76
|
-
readonly subscriptSix: string;
|
|
77
|
-
readonly subscriptSeven: string;
|
|
78
|
-
readonly subscriptEight: string;
|
|
79
|
-
readonly subscriptNine: string;
|
|
80
|
-
readonly oneHalf: string;
|
|
81
|
-
readonly oneThird: string;
|
|
82
|
-
readonly oneQuarter: string;
|
|
83
|
-
readonly oneFifth: string;
|
|
84
|
-
readonly oneSixth: string;
|
|
85
|
-
readonly oneSeventh: string;
|
|
86
|
-
readonly oneEighth: string;
|
|
87
|
-
readonly oneNinth: string;
|
|
88
|
-
readonly oneTenth: string;
|
|
89
|
-
readonly twoThirds: string;
|
|
90
|
-
readonly twoFifths: string;
|
|
91
|
-
readonly threeQuarters: string;
|
|
92
|
-
readonly threeFifths: string;
|
|
93
|
-
readonly threeEighths: string;
|
|
94
|
-
readonly fourFifths: string;
|
|
95
|
-
readonly fiveSixths: string;
|
|
96
|
-
readonly fiveEighths: string;
|
|
97
|
-
readonly sevenEighth: string;
|
|
98
|
-
readonly line: string;
|
|
99
|
-
readonly lineBold: string;
|
|
100
|
-
readonly lineDouble: string;
|
|
101
|
-
readonly lineDashed0: string;
|
|
102
|
-
readonly lineDashed1: string;
|
|
103
|
-
readonly lineDashed2: string;
|
|
104
|
-
readonly lineDashed3: string;
|
|
105
|
-
readonly lineDashed4: string;
|
|
106
|
-
readonly lineDashed5: string;
|
|
107
|
-
readonly lineDashed6: string;
|
|
108
|
-
readonly lineDashed7: string;
|
|
109
|
-
readonly lineDashed8: string;
|
|
110
|
-
readonly lineDashed9: string;
|
|
111
|
-
readonly lineDashed10: string;
|
|
112
|
-
readonly lineDashed11: string;
|
|
113
|
-
readonly lineDashed12: string;
|
|
114
|
-
readonly lineDashed13: string;
|
|
115
|
-
readonly lineDashed14: string;
|
|
116
|
-
readonly lineDashed15: string;
|
|
117
|
-
readonly lineVertical: string;
|
|
118
|
-
readonly lineVerticalBold: string;
|
|
119
|
-
readonly lineVerticalDouble: string;
|
|
120
|
-
readonly lineVerticalDashed0: string;
|
|
121
|
-
readonly lineVerticalDashed1: string;
|
|
122
|
-
readonly lineVerticalDashed2: string;
|
|
123
|
-
readonly lineVerticalDashed3: string;
|
|
124
|
-
readonly lineVerticalDashed4: string;
|
|
125
|
-
readonly lineVerticalDashed5: string;
|
|
126
|
-
readonly lineVerticalDashed6: string;
|
|
127
|
-
readonly lineVerticalDashed7: string;
|
|
128
|
-
readonly lineVerticalDashed8: string;
|
|
129
|
-
readonly lineVerticalDashed9: string;
|
|
130
|
-
readonly lineVerticalDashed10: string;
|
|
131
|
-
readonly lineVerticalDashed11: string;
|
|
132
|
-
readonly lineDownLeft: string;
|
|
133
|
-
readonly lineDownLeftArc: string;
|
|
134
|
-
readonly lineDownBoldLeftBold: string;
|
|
135
|
-
readonly lineDownBoldLeft: string;
|
|
136
|
-
readonly lineDownLeftBold: string;
|
|
137
|
-
readonly lineDownDoubleLeftDouble: string;
|
|
138
|
-
readonly lineDownDoubleLeft: string;
|
|
139
|
-
readonly lineDownLeftDouble: string;
|
|
140
|
-
readonly lineDownRight: string;
|
|
141
|
-
readonly lineDownRightArc: string;
|
|
142
|
-
readonly lineDownBoldRightBold: string;
|
|
143
|
-
readonly lineDownBoldRight: string;
|
|
144
|
-
readonly lineDownRightBold: string;
|
|
145
|
-
readonly lineDownDoubleRightDouble: string;
|
|
146
|
-
readonly lineDownDoubleRight: string;
|
|
147
|
-
readonly lineDownRightDouble: string;
|
|
148
|
-
readonly lineUpLeft: string;
|
|
149
|
-
readonly lineUpLeftArc: string;
|
|
150
|
-
readonly lineUpBoldLeftBold: string;
|
|
151
|
-
readonly lineUpBoldLeft: string;
|
|
152
|
-
readonly lineUpLeftBold: string;
|
|
153
|
-
readonly lineUpDoubleLeftDouble: string;
|
|
154
|
-
readonly lineUpDoubleLeft: string;
|
|
155
|
-
readonly lineUpLeftDouble: string;
|
|
156
|
-
readonly lineUpRight: string;
|
|
157
|
-
readonly lineUpRightArc: string;
|
|
158
|
-
readonly lineUpBoldRightBold: string;
|
|
159
|
-
readonly lineUpBoldRight: string;
|
|
160
|
-
readonly lineUpRightBold: string;
|
|
161
|
-
readonly lineUpDoubleRightDouble: string;
|
|
162
|
-
readonly lineUpDoubleRight: string;
|
|
163
|
-
readonly lineUpRightDouble: string;
|
|
164
|
-
readonly lineUpDownLeft: string;
|
|
165
|
-
readonly lineUpBoldDownBoldLeftBold: string;
|
|
166
|
-
readonly lineUpBoldDownBoldLeft: string;
|
|
167
|
-
readonly lineUpDownLeftBold: string;
|
|
168
|
-
readonly lineUpBoldDownLeftBold: string;
|
|
169
|
-
readonly lineUpDownBoldLeftBold: string;
|
|
170
|
-
readonly lineUpDownBoldLeft: string;
|
|
171
|
-
readonly lineUpBoldDownLeft: string;
|
|
172
|
-
readonly lineUpDoubleDownDoubleLeftDouble: string;
|
|
173
|
-
readonly lineUpDoubleDownDoubleLeft: string;
|
|
174
|
-
readonly lineUpDownLeftDouble: string;
|
|
175
|
-
readonly lineUpDownRight: string;
|
|
176
|
-
readonly lineUpBoldDownBoldRightBold: string;
|
|
177
|
-
readonly lineUpBoldDownBoldRight: string;
|
|
178
|
-
readonly lineUpDownRightBold: string;
|
|
179
|
-
readonly lineUpBoldDownRightBold: string;
|
|
180
|
-
readonly lineUpDownBoldRightBold: string;
|
|
181
|
-
readonly lineUpDownBoldRight: string;
|
|
182
|
-
readonly lineUpBoldDownRight: string;
|
|
183
|
-
readonly lineUpDoubleDownDoubleRightDouble: string;
|
|
184
|
-
readonly lineUpDoubleDownDoubleRight: string;
|
|
185
|
-
readonly lineUpDownRightDouble: string;
|
|
186
|
-
readonly lineDownLeftRight: string;
|
|
187
|
-
readonly lineDownBoldLeftBoldRightBold: string;
|
|
188
|
-
readonly lineDownLeftBoldRightBold: string;
|
|
189
|
-
readonly lineDownBoldLeftRight: string;
|
|
190
|
-
readonly lineDownBoldLeftBoldRight: string;
|
|
191
|
-
readonly lineDownBoldLeftRightBold: string;
|
|
192
|
-
readonly lineDownLeftRightBold: string;
|
|
193
|
-
readonly lineDownLeftBoldRight: string;
|
|
194
|
-
readonly lineDownDoubleLeftDoubleRightDouble: string;
|
|
195
|
-
readonly lineDownDoubleLeftRight: string;
|
|
196
|
-
readonly lineDownLeftDoubleRightDouble: string;
|
|
197
|
-
readonly lineUpLeftRight: string;
|
|
198
|
-
readonly lineUpBoldLeftBoldRightBold: string;
|
|
199
|
-
readonly lineUpLeftBoldRightBold: string;
|
|
200
|
-
readonly lineUpBoldLeftRight: string;
|
|
201
|
-
readonly lineUpBoldLeftBoldRight: string;
|
|
202
|
-
readonly lineUpBoldLeftRightBold: string;
|
|
203
|
-
readonly lineUpLeftRightBold: string;
|
|
204
|
-
readonly lineUpLeftBoldRight: string;
|
|
205
|
-
readonly lineUpDoubleLeftDoubleRightDouble: string;
|
|
206
|
-
readonly lineUpDoubleLeftRight: string;
|
|
207
|
-
readonly lineUpLeftDoubleRightDouble: string;
|
|
208
|
-
readonly lineUpDownLeftRight: string;
|
|
209
|
-
readonly lineUpBoldDownBoldLeftBoldRightBold: string;
|
|
210
|
-
readonly lineUpDownBoldLeftBoldRightBold: string;
|
|
211
|
-
readonly lineUpBoldDownLeftBoldRightBold: string;
|
|
212
|
-
readonly lineUpBoldDownBoldLeftRightBold: string;
|
|
213
|
-
readonly lineUpBoldDownBoldLeftBoldRight: string;
|
|
214
|
-
readonly lineUpBoldDownLeftRight: string;
|
|
215
|
-
readonly lineUpDownBoldLeftRight: string;
|
|
216
|
-
readonly lineUpDownLeftBoldRight: string;
|
|
217
|
-
readonly lineUpDownLeftRightBold: string;
|
|
218
|
-
readonly lineUpBoldDownBoldLeftRight: string;
|
|
219
|
-
readonly lineUpDownLeftBoldRightBold: string;
|
|
220
|
-
readonly lineUpBoldDownLeftBoldRight: string;
|
|
221
|
-
readonly lineUpBoldDownLeftRightBold: string;
|
|
222
|
-
readonly lineUpDownBoldLeftBoldRight: string;
|
|
223
|
-
readonly lineUpDownBoldLeftRightBold: string;
|
|
224
|
-
readonly lineUpDoubleDownDoubleLeftDoubleRightDouble: string;
|
|
225
|
-
readonly lineUpDoubleDownDoubleLeftRight: string;
|
|
226
|
-
readonly lineUpDownLeftDoubleRightDouble: string;
|
|
227
|
-
readonly lineCross: string;
|
|
228
|
-
readonly lineBackslash: string;
|
|
229
|
-
readonly lineSlash: string;
|
|
230
|
-
};
|
|
231
|
-
|
|
232
|
-
type FigureSet = typeof figureSet;
|
|
233
|
-
|
|
234
|
-
/**
|
|
235
|
-
Symbols to use when the terminal supports Unicode symbols.
|
|
236
|
-
*/
|
|
237
|
-
export const mainSymbols: FigureSet;
|
|
238
|
-
|
|
239
|
-
/**
|
|
240
|
-
Symbols to use when the terminal does not support Unicode symbols.
|
|
241
|
-
*/
|
|
242
|
-
export const fallbackSymbols: FigureSet;
|
|
243
|
-
|
|
244
|
-
/**
|
|
245
|
-
Symbols to use on any terminal.
|
|
246
|
-
*/
|
|
247
|
-
export default figureSet;
|
|
248
|
-
|
|
249
|
-
export type Options = {
|
|
250
|
-
/**
|
|
251
|
-
Whether to replace symbols with fallbacks.
|
|
252
|
-
|
|
253
|
-
This can be set to `true` to always use fallback symbols, whether the terminal has poor Unicode support or not.
|
|
254
|
-
|
|
255
|
-
@default `true` if the terminal has poor Unicode support
|
|
256
|
-
*/
|
|
257
|
-
readonly useFallback?: boolean;
|
|
258
|
-
};
|
|
259
|
-
|
|
260
|
-
/**
|
|
261
|
-
Returns the input with replaced fallback symbols if the terminal has poor Unicode support.
|
|
262
|
-
|
|
263
|
-
@param string - String where the Unicode symbols will be replaced with fallback symbols depending on the terminal.
|
|
264
|
-
@returns The input with replaced fallback Unicode symbols.
|
|
265
|
-
|
|
266
|
-
@example
|
|
267
|
-
```
|
|
268
|
-
import figures, {replaceSymbols} from 'figures';
|
|
269
|
-
|
|
270
|
-
console.log(replaceSymbols('✔ check'));
|
|
271
|
-
// On terminals with Unicode symbols: ✔ check
|
|
272
|
-
// On other terminals: √ check
|
|
273
|
-
|
|
274
|
-
console.log(replaceSymbols('✔ check', {useFallback: true}));
|
|
275
|
-
// On terminals with Unicode symbols: √ check
|
|
276
|
-
// On other terminals: √ check
|
|
277
|
-
```
|
|
278
|
-
*/
|
|
279
|
-
export function replaceSymbols(string: string, options?: Options): string;
|