coa 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- package/.npmignore +6 -0
- package/.nyc_output/1f2a0db5a6d6559149db56d397f47cfc.json +1 -0
- package/.nyc_output/75b82d38f2186df930141082076e11c6.json +1 -0
- package/.travis.yml +9 -0
- package/GNUmakefile +34 -0
- package/README.md +1 -19
- package/coverage/base.css +212 -0
- package/coverage/coa/index.html +93 -0
- package/coverage/coa/index.js.html +68 -0
- package/coverage/coa/lib/arg.js.html +239 -0
- package/coverage/coa/lib/cmd.js.html +1556 -0
- package/coverage/coa/lib/coaobject.js.html +365 -0
- package/coverage/coa/lib/coaparam.js.html +440 -0
- package/coverage/coa/lib/color.js.html +131 -0
- package/coverage/coa/lib/completion.js.html +593 -0
- package/coverage/coa/lib/index.html +197 -0
- package/coverage/coa/lib/index.js.html +107 -0
- package/coverage/coa/lib/opt.js.html +524 -0
- package/coverage/coa/lib/shell.js.html +107 -0
- package/coverage/index.html +106 -0
- package/coverage/prettify.css +1 -0
- package/coverage/prettify.js +1 -0
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +158 -0
- package/index.js +1 -1
- package/lib/arg.js +161 -44
- package/lib/cmd.js +547 -434
- package/lib/color.js +22 -19
- package/lib/completion.js +119 -161
- package/lib/index.js +10 -14
- package/lib/opt.js +313 -130
- package/lib/shell.js +13 -13
- package/package.json +14 -19
- package/qq.js +17 -0
- package/src/arg.coffee +130 -0
- package/src/cmd.coffee +456 -0
- package/src/color.coffee +25 -0
- package/src/completion.coffee +156 -0
- package/src/index.coffee +5 -0
- package/src/opt.coffee +243 -0
- package/src/shell.coffee +10 -0
- package/test/coa.js +496 -0
- package/test/mocha.opts +2 -0
- package/test/shell-test.js +60 -0
- package/tests/api-h.js +9 -0
- package/tests/h.js +6 -0
- package/LICENSE +0 -21
- package/lib/coaobject.js +0 -100
- package/lib/coaparam.js +0 -125
@@ -0,0 +1,440 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<title>Code coverage report for coa/lib/coaparam.js</title>
|
5
|
+
<meta charset="utf-8" />
|
6
|
+
<link rel="stylesheet" href="../../prettify.css" />
|
7
|
+
<link rel="stylesheet" href="../../base.css" />
|
8
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
9
|
+
<style type='text/css'>
|
10
|
+
.coverage-summary .sorter {
|
11
|
+
background-image: url(../../sort-arrow-sprite.png);
|
12
|
+
}
|
13
|
+
</style>
|
14
|
+
</head>
|
15
|
+
<body>
|
16
|
+
<div class='wrapper'>
|
17
|
+
<div class='pad1'>
|
18
|
+
<h1>
|
19
|
+
<a href="../../index.html">All files</a> / <a href="index.html">coa/lib</a> coaparam.js
|
20
|
+
</h1>
|
21
|
+
<div class='clearfix'>
|
22
|
+
<div class='fl pad1y space-right2'>
|
23
|
+
<span class="strong">51.61% </span>
|
24
|
+
<span class="quiet">Statements</span>
|
25
|
+
<span class='fraction'>16/31</span>
|
26
|
+
</div>
|
27
|
+
<div class='fl pad1y space-right2'>
|
28
|
+
<span class="strong">0% </span>
|
29
|
+
<span class="quiet">Branches</span>
|
30
|
+
<span class='fraction'>0/8</span>
|
31
|
+
</div>
|
32
|
+
<div class='fl pad1y space-right2'>
|
33
|
+
<span class="strong">55.56% </span>
|
34
|
+
<span class="quiet">Functions</span>
|
35
|
+
<span class='fraction'>5/9</span>
|
36
|
+
</div>
|
37
|
+
<div class='fl pad1y space-right2'>
|
38
|
+
<span class="strong">51.61% </span>
|
39
|
+
<span class="quiet">Lines</span>
|
40
|
+
<span class='fraction'>16/31</span>
|
41
|
+
</div>
|
42
|
+
</div>
|
43
|
+
</div>
|
44
|
+
<div class='status-line medium'></div>
|
45
|
+
<pre><table class="coverage">
|
46
|
+
<tr><td class="line-count quiet">1
|
47
|
+
2
|
48
|
+
3
|
49
|
+
4
|
50
|
+
5
|
51
|
+
6
|
52
|
+
7
|
53
|
+
8
|
54
|
+
9
|
55
|
+
10
|
56
|
+
11
|
57
|
+
12
|
58
|
+
13
|
59
|
+
14
|
60
|
+
15
|
61
|
+
16
|
62
|
+
17
|
63
|
+
18
|
64
|
+
19
|
65
|
+
20
|
66
|
+
21
|
67
|
+
22
|
68
|
+
23
|
69
|
+
24
|
70
|
+
25
|
71
|
+
26
|
72
|
+
27
|
73
|
+
28
|
74
|
+
29
|
75
|
+
30
|
76
|
+
31
|
77
|
+
32
|
78
|
+
33
|
79
|
+
34
|
80
|
+
35
|
81
|
+
36
|
82
|
+
37
|
83
|
+
38
|
84
|
+
39
|
85
|
+
40
|
86
|
+
41
|
87
|
+
42
|
88
|
+
43
|
89
|
+
44
|
90
|
+
45
|
91
|
+
46
|
92
|
+
47
|
93
|
+
48
|
94
|
+
49
|
95
|
+
50
|
96
|
+
51
|
97
|
+
52
|
98
|
+
53
|
99
|
+
54
|
100
|
+
55
|
101
|
+
56
|
102
|
+
57
|
103
|
+
58
|
104
|
+
59
|
105
|
+
60
|
106
|
+
61
|
107
|
+
62
|
108
|
+
63
|
109
|
+
64
|
110
|
+
65
|
111
|
+
66
|
112
|
+
67
|
113
|
+
68
|
114
|
+
69
|
115
|
+
70
|
116
|
+
71
|
117
|
+
72
|
118
|
+
73
|
119
|
+
74
|
120
|
+
75
|
121
|
+
76
|
122
|
+
77
|
123
|
+
78
|
124
|
+
79
|
125
|
+
80
|
126
|
+
81
|
127
|
+
82
|
128
|
+
83
|
129
|
+
84
|
130
|
+
85
|
131
|
+
86
|
132
|
+
87
|
133
|
+
88
|
134
|
+
89
|
135
|
+
90
|
136
|
+
91
|
137
|
+
92
|
138
|
+
93
|
139
|
+
94
|
140
|
+
95
|
141
|
+
96
|
142
|
+
97
|
143
|
+
98
|
144
|
+
99
|
145
|
+
100
|
146
|
+
101
|
147
|
+
102
|
148
|
+
103
|
149
|
+
104
|
150
|
+
105
|
151
|
+
106
|
152
|
+
107
|
153
|
+
108
|
154
|
+
109
|
155
|
+
110
|
156
|
+
111
|
157
|
+
112
|
158
|
+
113
|
159
|
+
114
|
160
|
+
115
|
161
|
+
116
|
162
|
+
117
|
163
|
+
118
|
164
|
+
119
|
165
|
+
120
|
166
|
+
121
|
167
|
+
122
|
168
|
+
123
|
169
|
+
124
|
170
|
+
125
|
171
|
+
126</td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
172
|
+
<span class="cline-any cline-neutral"> </span>
|
173
|
+
<span class="cline-any cline-yes">1x</span>
|
174
|
+
<span class="cline-any cline-neutral"> </span>
|
175
|
+
<span class="cline-any cline-yes">1x</span>
|
176
|
+
<span class="cline-any cline-neutral"> </span>
|
177
|
+
<span class="cline-any cline-neutral"> </span>
|
178
|
+
<span class="cline-any cline-neutral"> </span>
|
179
|
+
<span class="cline-any cline-neutral"> </span>
|
180
|
+
<span class="cline-any cline-neutral"> </span>
|
181
|
+
<span class="cline-any cline-neutral"> </span>
|
182
|
+
<span class="cline-any cline-neutral"> </span>
|
183
|
+
<span class="cline-any cline-neutral"> </span>
|
184
|
+
<span class="cline-any cline-neutral"> </span>
|
185
|
+
<span class="cline-any cline-neutral"> </span>
|
186
|
+
<span class="cline-any cline-neutral"> </span>
|
187
|
+
<span class="cline-any cline-neutral"> </span>
|
188
|
+
<span class="cline-any cline-neutral"> </span>
|
189
|
+
<span class="cline-any cline-neutral"> </span>
|
190
|
+
<span class="cline-any cline-neutral"> </span>
|
191
|
+
<span class="cline-any cline-neutral"> </span>
|
192
|
+
<span class="cline-any cline-neutral"> </span>
|
193
|
+
<span class="cline-any cline-neutral"> </span>
|
194
|
+
<span class="cline-any cline-neutral"> </span>
|
195
|
+
<span class="cline-any cline-yes">1x</span>
|
196
|
+
<span class="cline-any cline-neutral"> </span>
|
197
|
+
<span class="cline-any cline-yes">32x</span>
|
198
|
+
<span class="cline-any cline-neutral"> </span>
|
199
|
+
<span class="cline-any cline-yes">32x</span>
|
200
|
+
<span class="cline-any cline-yes">32x</span>
|
201
|
+
<span class="cline-any cline-yes">32x</span>
|
202
|
+
<span class="cline-any cline-yes">32x</span>
|
203
|
+
<span class="cline-any cline-neutral"> </span>
|
204
|
+
<span class="cline-any cline-neutral"> </span>
|
205
|
+
<span class="cline-any cline-neutral"> </span>
|
206
|
+
<span class="cline-any cline-neutral"> </span>
|
207
|
+
<span class="cline-any cline-neutral"> </span>
|
208
|
+
<span class="cline-any cline-neutral"> </span>
|
209
|
+
<span class="cline-any cline-neutral"> </span>
|
210
|
+
<span class="cline-any cline-neutral"> </span>
|
211
|
+
<span class="cline-any cline-neutral"> </span>
|
212
|
+
<span class="cline-any cline-yes">9x</span>
|
213
|
+
<span class="cline-any cline-yes">9x</span>
|
214
|
+
<span class="cline-any cline-neutral"> </span>
|
215
|
+
<span class="cline-any cline-neutral"> </span>
|
216
|
+
<span class="cline-any cline-neutral"> </span>
|
217
|
+
<span class="cline-any cline-neutral"> </span>
|
218
|
+
<span class="cline-any cline-neutral"> </span>
|
219
|
+
<span class="cline-any cline-neutral"> </span>
|
220
|
+
<span class="cline-any cline-neutral"> </span>
|
221
|
+
<span class="cline-any cline-neutral"> </span>
|
222
|
+
<span class="cline-any cline-yes">3x</span>
|
223
|
+
<span class="cline-any cline-yes">3x</span>
|
224
|
+
<span class="cline-any cline-neutral"> </span>
|
225
|
+
<span class="cline-any cline-neutral"> </span>
|
226
|
+
<span class="cline-any cline-neutral"> </span>
|
227
|
+
<span class="cline-any cline-neutral"> </span>
|
228
|
+
<span class="cline-any cline-neutral"> </span>
|
229
|
+
<span class="cline-any cline-neutral"> </span>
|
230
|
+
<span class="cline-any cline-neutral"> </span>
|
231
|
+
<span class="cline-any cline-neutral"> </span>
|
232
|
+
<span class="cline-any cline-neutral"> </span>
|
233
|
+
<span class="cline-any cline-neutral"> </span>
|
234
|
+
<span class="cline-any cline-neutral"> </span>
|
235
|
+
<span class="cline-any cline-neutral"> </span>
|
236
|
+
<span class="cline-any cline-neutral"> </span>
|
237
|
+
<span class="cline-any cline-yes">1x</span>
|
238
|
+
<span class="cline-any cline-yes">1x</span>
|
239
|
+
<span class="cline-any cline-neutral"> </span>
|
240
|
+
<span class="cline-any cline-neutral"> </span>
|
241
|
+
<span class="cline-any cline-neutral"> </span>
|
242
|
+
<span class="cline-any cline-neutral"> </span>
|
243
|
+
<span class="cline-any cline-neutral"> </span>
|
244
|
+
<span class="cline-any cline-neutral"> </span>
|
245
|
+
<span class="cline-any cline-neutral"> </span>
|
246
|
+
<span class="cline-any cline-neutral"> </span>
|
247
|
+
<span class="cline-any cline-neutral"> </span>
|
248
|
+
<span class="cline-any cline-neutral"> </span>
|
249
|
+
<span class="cline-any cline-yes">1x</span>
|
250
|
+
<span class="cline-any cline-yes">1x</span>
|
251
|
+
<span class="cline-any cline-neutral"> </span>
|
252
|
+
<span class="cline-any cline-neutral"> </span>
|
253
|
+
<span class="cline-any cline-neutral"> </span>
|
254
|
+
<span class="cline-any cline-neutral"> </span>
|
255
|
+
<span class="cline-any cline-neutral"> </span>
|
256
|
+
<span class="cline-any cline-neutral"> </span>
|
257
|
+
<span class="cline-any cline-neutral"> </span>
|
258
|
+
<span class="cline-any cline-neutral"> </span>
|
259
|
+
<span class="cline-any cline-neutral"> </span>
|
260
|
+
<span class="cline-any cline-no"> </span>
|
261
|
+
<span class="cline-any cline-no"> </span>
|
262
|
+
<span class="cline-any cline-neutral"> </span>
|
263
|
+
<span class="cline-any cline-neutral"> </span>
|
264
|
+
<span class="cline-any cline-no"> </span>
|
265
|
+
<span class="cline-any cline-no"> </span>
|
266
|
+
<span class="cline-any cline-neutral"> </span>
|
267
|
+
<span class="cline-any cline-no"> </span>
|
268
|
+
<span class="cline-any cline-no"> </span>
|
269
|
+
<span class="cline-any cline-neutral"> </span>
|
270
|
+
<span class="cline-any cline-no"> </span>
|
271
|
+
<span class="cline-any cline-no"> </span>
|
272
|
+
<span class="cline-any cline-no"> </span>
|
273
|
+
<span class="cline-any cline-neutral"> </span>
|
274
|
+
<span class="cline-any cline-neutral"> </span>
|
275
|
+
<span class="cline-any cline-neutral"> </span>
|
276
|
+
<span class="cline-any cline-neutral"> </span>
|
277
|
+
<span class="cline-any cline-neutral"> </span>
|
278
|
+
<span class="cline-any cline-neutral"> </span>
|
279
|
+
<span class="cline-any cline-neutral"> </span>
|
280
|
+
<span class="cline-any cline-neutral"> </span>
|
281
|
+
<span class="cline-any cline-neutral"> </span>
|
282
|
+
<span class="cline-any cline-neutral"> </span>
|
283
|
+
<span class="cline-any cline-no"> </span>
|
284
|
+
<span class="cline-any cline-neutral"> </span>
|
285
|
+
<span class="cline-any cline-neutral"> </span>
|
286
|
+
<span class="cline-any cline-no"> </span>
|
287
|
+
<span class="cline-any cline-no"> </span>
|
288
|
+
<span class="cline-any cline-neutral"> </span>
|
289
|
+
<span class="cline-any cline-no"> </span>
|
290
|
+
<span class="cline-any cline-no"> </span>
|
291
|
+
<span class="cline-any cline-neutral"> </span>
|
292
|
+
<span class="cline-any cline-no"> </span>
|
293
|
+
<span class="cline-any cline-neutral"> </span>
|
294
|
+
<span class="cline-any cline-neutral"> </span>
|
295
|
+
<span class="cline-any cline-neutral"> </span>
|
296
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">'use strict';
|
297
|
+
|
298
|
+
const fs = require('fs');
|
299
|
+
|
300
|
+
const CoaObject = require('./coaobject');
|
301
|
+
|
302
|
+
/**
|
303
|
+
* COA Parameter
|
304
|
+
*
|
305
|
+
* Base class for options and arguments
|
306
|
+
*
|
307
|
+
* --------|-----|-----|-----
|
308
|
+
* | Cmd | Opt | Arg
|
309
|
+
* --------|-----|-----|-----
|
310
|
+
* arr | | ✓ | ✓
|
311
|
+
* req | | ✓ | ✓
|
312
|
+
* val | | ✓ | ✓
|
313
|
+
* def | | ✓ | ✓
|
314
|
+
* input | | ✓ | ✓
|
315
|
+
* output | | ✓ | ✓
|
316
|
+
*
|
317
|
+
* @class CoaParam
|
318
|
+
* @extends CoaObject
|
319
|
+
*/
|
320
|
+
module.exports = class CoaParam extends CoaObject {
|
321
|
+
constructor(cmd) {
|
322
|
+
super(cmd);
|
323
|
+
|
324
|
+
this._arr = false;
|
325
|
+
this._req = false;
|
326
|
+
this._val = undefined;
|
327
|
+
this._def = undefined;
|
328
|
+
}
|
329
|
+
|
330
|
+
/**
|
331
|
+
* Makes a param accepts multiple values.
|
332
|
+
* Otherwise, the value will be used by the latter passed.
|
333
|
+
*
|
334
|
+
* @returns {COA.CoaParam} - this instance (for chainability)
|
335
|
+
*/
|
336
|
+
arr() {
|
337
|
+
this._arr = true;
|
338
|
+
return this;
|
339
|
+
}
|
340
|
+
|
341
|
+
/**
|
342
|
+
* Makes a param required.
|
343
|
+
*
|
344
|
+
* @returns {COA.CoaParam} - this instance (for chainability)
|
345
|
+
*/
|
346
|
+
req() {
|
347
|
+
this._req = true;
|
348
|
+
return this;
|
349
|
+
}
|
350
|
+
|
351
|
+
/**
|
352
|
+
* Set a validation (or value) function for param.
|
353
|
+
* Value from command line passes through before becoming available from API.
|
354
|
+
* Using for validation and convertion simple types to any values.
|
355
|
+
*
|
356
|
+
* @param {Function} val - validating function,
|
357
|
+
* invoked in the context of option instance
|
358
|
+
* and has one parameter with value from command line.
|
359
|
+
* @returns {COA.CoaParam} - this instance (for chainability)
|
360
|
+
*/
|
361
|
+
val(val) {
|
362
|
+
this._val = val;
|
363
|
+
return this;
|
364
|
+
}
|
365
|
+
|
366
|
+
/**
|
367
|
+
* Set a default value for param.
|
368
|
+
* Default value passed through validation function as ordinary value.
|
369
|
+
*
|
370
|
+
* @param {*} def - default value of function generator
|
371
|
+
* @returns {COA.CoaParam} - this instance (for chainability)
|
372
|
+
*/
|
373
|
+
def(def) {
|
374
|
+
this._def = def;
|
375
|
+
return this;
|
376
|
+
}
|
377
|
+
|
378
|
+
/**
|
379
|
+
* Make option value inputting stream.
|
380
|
+
* It's add useful validation and shortcut for STDIN.
|
381
|
+
*
|
382
|
+
* @returns {COA.CoaParam} - this instance (for chainability)
|
383
|
+
*/
|
384
|
+
<span class="fstat-no" title="function not covered" > in</span>put() {
|
385
|
+
<span class="cstat-no" title="statement not covered" > process.stdin.pause();</span>
|
386
|
+
<span class="cstat-no" title="statement not covered" > return this</span>
|
387
|
+
.def(process.stdin)
|
388
|
+
.val(<span class="fstat-no" title="function not covered" >fu</span>nction(v) {
|
389
|
+
<span class="cstat-no" title="statement not covered" > if(typeof v !== 'string')</span>
|
390
|
+
<span class="cstat-no" title="statement not covered" > return v;</span>
|
391
|
+
|
392
|
+
<span class="cstat-no" title="statement not covered" > if(v === '-')</span>
|
393
|
+
<span class="cstat-no" title="statement not covered" > return process.stdin;</span>
|
394
|
+
|
395
|
+
const s = <span class="cstat-no" title="statement not covered" >fs.createReadStream(v, { encoding : 'utf8' });</span>
|
396
|
+
<span class="cstat-no" title="statement not covered" > s.pause();</span>
|
397
|
+
<span class="cstat-no" title="statement not covered" > return s;</span>
|
398
|
+
});
|
399
|
+
}
|
400
|
+
|
401
|
+
/**
|
402
|
+
* Make option value outputing stream.
|
403
|
+
* It's add useful validation and shortcut for STDOUT.
|
404
|
+
*
|
405
|
+
* @returns {COA.CoaParam} - this instance (for chainability)
|
406
|
+
*/
|
407
|
+
<span class="fstat-no" title="function not covered" > ou</span>tput() {
|
408
|
+
<span class="cstat-no" title="statement not covered" > return this</span>
|
409
|
+
.def(process.stdout)
|
410
|
+
.val(<span class="fstat-no" title="function not covered" >fu</span>nction(v) {
|
411
|
+
<span class="cstat-no" title="statement not covered" > if(typeof v !== 'string')</span>
|
412
|
+
<span class="cstat-no" title="statement not covered" > return v;</span>
|
413
|
+
|
414
|
+
<span class="cstat-no" title="statement not covered" > if(v === '-')</span>
|
415
|
+
<span class="cstat-no" title="statement not covered" > return process.stdout;</span>
|
416
|
+
|
417
|
+
<span class="cstat-no" title="statement not covered" > return fs.createWriteStream(v, { encoding : 'utf8' });</span>
|
418
|
+
});
|
419
|
+
}
|
420
|
+
};
|
421
|
+
</pre></td></tr>
|
422
|
+
</table></pre>
|
423
|
+
<div class='push'></div><!-- for sticky footer -->
|
424
|
+
</div><!-- /wrapper -->
|
425
|
+
<div class='footer quiet pad2 space-top1 center small'>
|
426
|
+
Code coverage
|
427
|
+
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Fri Feb 17 2017 22:25:28 GMT+0300 (MSK)
|
428
|
+
</div>
|
429
|
+
</div>
|
430
|
+
<script src="../../prettify.js"></script>
|
431
|
+
<script>
|
432
|
+
window.onload = function () {
|
433
|
+
if (typeof prettyPrint === 'function') {
|
434
|
+
prettyPrint();
|
435
|
+
}
|
436
|
+
};
|
437
|
+
</script>
|
438
|
+
<script src="../../sorter.js"></script>
|
439
|
+
</body>
|
440
|
+
</html>
|
@@ -0,0 +1,131 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<title>Code coverage report for coa/lib/color.js</title>
|
5
|
+
<meta charset="utf-8" />
|
6
|
+
<link rel="stylesheet" href="../../prettify.css" />
|
7
|
+
<link rel="stylesheet" href="../../base.css" />
|
8
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
9
|
+
<style type='text/css'>
|
10
|
+
.coverage-summary .sorter {
|
11
|
+
background-image: url(../../sort-arrow-sprite.png);
|
12
|
+
}
|
13
|
+
</style>
|
14
|
+
</head>
|
15
|
+
<body>
|
16
|
+
<div class='wrapper'>
|
17
|
+
<div class='pad1'>
|
18
|
+
<h1>
|
19
|
+
<a href="../../index.html">All files</a> / <a href="index.html">coa/lib</a> color.js
|
20
|
+
</h1>
|
21
|
+
<div class='clearfix'>
|
22
|
+
<div class='fl pad1y space-right2'>
|
23
|
+
<span class="strong">100% </span>
|
24
|
+
<span class="quiet">Statements</span>
|
25
|
+
<span class='fraction'>3/3</span>
|
26
|
+
</div>
|
27
|
+
<div class='fl pad1y space-right2'>
|
28
|
+
<span class="strong">100% </span>
|
29
|
+
<span class="quiet">Branches</span>
|
30
|
+
<span class='fraction'>0/0</span>
|
31
|
+
</div>
|
32
|
+
<div class='fl pad1y space-right2'>
|
33
|
+
<span class="strong">100% </span>
|
34
|
+
<span class="quiet">Functions</span>
|
35
|
+
<span class='fraction'>1/1</span>
|
36
|
+
</div>
|
37
|
+
<div class='fl pad1y space-right2'>
|
38
|
+
<span class="strong">100% </span>
|
39
|
+
<span class="quiet">Lines</span>
|
40
|
+
<span class='fraction'>2/2</span>
|
41
|
+
</div>
|
42
|
+
</div>
|
43
|
+
</div>
|
44
|
+
<div class='status-line high'></div>
|
45
|
+
<pre><table class="coverage">
|
46
|
+
<tr><td class="line-count quiet">1
|
47
|
+
2
|
48
|
+
3
|
49
|
+
4
|
50
|
+
5
|
51
|
+
6
|
52
|
+
7
|
53
|
+
8
|
54
|
+
9
|
55
|
+
10
|
56
|
+
11
|
57
|
+
12
|
58
|
+
13
|
59
|
+
14
|
60
|
+
15
|
61
|
+
16
|
62
|
+
17
|
63
|
+
18
|
64
|
+
19
|
65
|
+
20
|
66
|
+
21
|
67
|
+
22
|
68
|
+
23</td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
69
|
+
<span class="cline-any cline-neutral"> </span>
|
70
|
+
<span class="cline-any cline-yes">1x</span>
|
71
|
+
<span class="cline-any cline-neutral"> </span>
|
72
|
+
<span class="cline-any cline-neutral"> </span>
|
73
|
+
<span class="cline-any cline-neutral"> </span>
|
74
|
+
<span class="cline-any cline-neutral"> </span>
|
75
|
+
<span class="cline-any cline-neutral"> </span>
|
76
|
+
<span class="cline-any cline-neutral"> </span>
|
77
|
+
<span class="cline-any cline-neutral"> </span>
|
78
|
+
<span class="cline-any cline-neutral"> </span>
|
79
|
+
<span class="cline-any cline-neutral"> </span>
|
80
|
+
<span class="cline-any cline-neutral"> </span>
|
81
|
+
<span class="cline-any cline-neutral"> </span>
|
82
|
+
<span class="cline-any cline-neutral"> </span>
|
83
|
+
<span class="cline-any cline-neutral"> </span>
|
84
|
+
<span class="cline-any cline-neutral"> </span>
|
85
|
+
<span class="cline-any cline-neutral"> </span>
|
86
|
+
<span class="cline-any cline-neutral"> </span>
|
87
|
+
<span class="cline-any cline-neutral"> </span>
|
88
|
+
<span class="cline-any cline-neutral"> </span>
|
89
|
+
<span class="cline-any cline-yes">4x</span>
|
90
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">'use strict';
|
91
|
+
|
92
|
+
const colors = {
|
93
|
+
black : '30',
|
94
|
+
dgray : '1;30',
|
95
|
+
red : '31',
|
96
|
+
lred : '1;31',
|
97
|
+
green : '32',
|
98
|
+
lgreen : '1;32',
|
99
|
+
brown : '33',
|
100
|
+
yellow : '1;33',
|
101
|
+
blue : '34',
|
102
|
+
lblue : '1;34',
|
103
|
+
purple : '35',
|
104
|
+
lpurple : '1;35',
|
105
|
+
cyan : '36',
|
106
|
+
lcyan : '1;36',
|
107
|
+
lgray : '37',
|
108
|
+
white : '1;37'
|
109
|
+
};
|
110
|
+
|
111
|
+
module.exports = (c, str) => `\x1B[${colors[c]}m${str}\x1B[m`;
|
112
|
+
</pre></td></tr>
|
113
|
+
</table></pre>
|
114
|
+
<div class='push'></div><!-- for sticky footer -->
|
115
|
+
</div><!-- /wrapper -->
|
116
|
+
<div class='footer quiet pad2 space-top1 center small'>
|
117
|
+
Code coverage
|
118
|
+
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Fri Feb 17 2017 22:25:28 GMT+0300 (MSK)
|
119
|
+
</div>
|
120
|
+
</div>
|
121
|
+
<script src="../../prettify.js"></script>
|
122
|
+
<script>
|
123
|
+
window.onload = function () {
|
124
|
+
if (typeof prettyPrint === 'function') {
|
125
|
+
prettyPrint();
|
126
|
+
}
|
127
|
+
};
|
128
|
+
</script>
|
129
|
+
<script src="../../sorter.js"></script>
|
130
|
+
</body>
|
131
|
+
</html>
|