UNPKG

20.3 kBHTMLView Raw
1<!doctype html>
2<html lang="en">
3<head>
4 <title>Code coverage report for es6-sham.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> es6-sham.js
20 </h1>
21 <div class='clearfix'>
22 <div class='fl pad1y space-right2'>
23 <span class="strong">33.85% </span>
24 <span class="quiet">Statements</span>
25 <span class='fraction'>22/65</span>
26 </div>
27 <div class='fl pad1y space-right2'>
28 <span class="strong">37.5% </span>
29 <span class="quiet">Branches</span>
30 <span class='fraction'>9/24</span>
31 </div>
32 <div class='fl pad1y space-right2'>
33 <span class="strong">40% </span>
34 <span class="quiet">Functions</span>
35 <span class='fraction'>6/15</span>
36 </div>
37 <div class='fl pad1y space-right2'>
38 <span class="strong">32.81% </span>
39 <span class="quiet">Lines</span>
40 <span class='fraction'>21/64</span>
41 </div>
42 </div>
43 </div>
44 <div class='status-line low'></div>
45<pre><table class="coverage">
46<tr><td class="line-count quiet">1
472
483
494
505
516
527
538
549
5510
5611
5712
5813
5914
6015
6116
6217
6318
6419
6520
6621
6722
6823
6924
7025
7126
7227
7328
7429
7530
7631
7732
7833
7934
8035
8136
8237
8338
8439
8540
8641
8742
8843
8944
9045
9146
9247
9348
9449
9550
9651
9752
9853
9954
10055
10156
10257
10358
10459
10560
10661
10762
10863
10964
11065
11166
11267
11368
11469
11570
11671
11772
11873
11974
12075
12176
12277
12378
12479
12580
12681
12782
12883
12984
13085
13186
13287
13388
13489
13590
13691
13792
13893
13994
14095
14196
14297
14398
14499
145100
146101
147102
148103
149104
150105
151106
152107
153108
154109
155110
156111
157112
158113
159114
160115
161116
162117
163118
164119
165120
166121
167122
168123
169124
170125
171126
172127
173128
174129
175130
176131
177132
178133
179134
180135
181136
182137
183138
184139
185140
186141
187142
188143
189144
190145
191146
192147
193148
194149
195150
196151
197152
198153
199154
200155
201156
202157
203158
204159
205160
206161
207162
208163
209164
210165
211166
212167
213168
214169
215170</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
216<span class="cline-any cline-neutral">&nbsp;</span>
217<span class="cline-any cline-neutral">&nbsp;</span>
218<span class="cline-any cline-neutral">&nbsp;</span>
219<span class="cline-any cline-neutral">&nbsp;</span>
220<span class="cline-any cline-neutral">&nbsp;</span>
221<span class="cline-any cline-neutral">&nbsp;</span>
222<span class="cline-any cline-neutral">&nbsp;</span>
223<span class="cline-any cline-neutral">&nbsp;</span>
224<span class="cline-any cline-neutral">&nbsp;</span>
225<span class="cline-any cline-neutral">&nbsp;</span>
226<span class="cline-any cline-neutral">&nbsp;</span>
227<span class="cline-any cline-yes">1x</span>
228<span class="cline-any cline-neutral">&nbsp;</span>
229<span class="cline-any cline-yes">1x</span>
230<span class="cline-any cline-neutral">&nbsp;</span>
231<span class="cline-any cline-no">&nbsp;</span>
232<span class="cline-any cline-yes">1x</span>
233<span class="cline-any cline-neutral">&nbsp;</span>
234<span class="cline-any cline-neutral">&nbsp;</span>
235<span class="cline-any cline-neutral">&nbsp;</span>
236<span class="cline-any cline-yes">1x</span>
237<span class="cline-any cline-neutral">&nbsp;</span>
238<span class="cline-any cline-neutral">&nbsp;</span>
239<span class="cline-any cline-no">&nbsp;</span>
240<span class="cline-any cline-neutral">&nbsp;</span>
241<span class="cline-any cline-neutral">&nbsp;</span>
242<span class="cline-any cline-neutral">&nbsp;</span>
243<span class="cline-any cline-neutral">&nbsp;</span>
244<span class="cline-any cline-neutral">&nbsp;</span>
245<span class="cline-any cline-yes">1x</span>
246<span class="cline-any cline-neutral">&nbsp;</span>
247<span class="cline-any cline-neutral">&nbsp;</span>
248<span class="cline-any cline-yes">1x</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-yes">1x</span>
252<span class="cline-any cline-yes">1x</span>
253<span class="cline-any cline-neutral">&nbsp;</span>
254<span class="cline-any cline-yes">1x</span>
255<span class="cline-any cline-yes">1x</span>
256<span class="cline-any cline-yes">1x</span>
257<span class="cline-any cline-yes">1x</span>
258<span class="cline-any cline-neutral">&nbsp;</span>
259<span class="cline-any cline-no">&nbsp;</span>
260<span class="cline-any cline-neutral">&nbsp;</span>
261<span class="cline-any cline-neutral">&nbsp;</span>
262<span class="cline-any cline-yes">1x</span>
263<span class="cline-any cline-neutral">&nbsp;</span>
264<span class="cline-any cline-yes">1x</span>
265<span class="cline-any cline-yes">1x</span>
266<span class="cline-any cline-neutral">&nbsp;</span>
267<span class="cline-any cline-neutral">&nbsp;</span>
268<span class="cline-any cline-yes">1x</span>
269<span class="cline-any cline-neutral">&nbsp;</span>
270<span class="cline-any cline-neutral">&nbsp;</span>
271<span class="cline-any cline-neutral">&nbsp;</span>
272<span class="cline-any cline-neutral">&nbsp;</span>
273<span class="cline-any cline-neutral">&nbsp;</span>
274<span class="cline-any cline-neutral">&nbsp;</span>
275<span class="cline-any cline-neutral">&nbsp;</span>
276<span class="cline-any cline-neutral">&nbsp;</span>
277<span class="cline-any cline-neutral">&nbsp;</span>
278<span class="cline-any cline-neutral">&nbsp;</span>
279<span class="cline-any cline-yes">1x</span>
280<span class="cline-any cline-yes">1x</span>
281<span class="cline-any cline-neutral">&nbsp;</span>
282<span class="cline-any cline-neutral">&nbsp;</span>
283<span class="cline-any cline-neutral">&nbsp;</span>
284<span class="cline-any cline-no">&nbsp;</span>
285<span class="cline-any cline-no">&nbsp;</span>
286<span class="cline-any cline-no">&nbsp;</span>
287<span class="cline-any cline-no">&nbsp;</span>
288<span class="cline-any cline-no">&nbsp;</span>
289<span class="cline-any cline-no">&nbsp;</span>
290<span class="cline-any cline-neutral">&nbsp;</span>
291<span class="cline-any cline-no">&nbsp;</span>
292<span class="cline-any cline-neutral">&nbsp;</span>
293<span class="cline-any cline-no">&nbsp;</span>
294<span class="cline-any cline-no">&nbsp;</span>
295<span class="cline-any cline-neutral">&nbsp;</span>
296<span class="cline-any cline-neutral">&nbsp;</span>
297<span class="cline-any cline-neutral">&nbsp;</span>
298<span class="cline-any cline-neutral">&nbsp;</span>
299<span class="cline-any cline-neutral">&nbsp;</span>
300<span class="cline-any cline-no">&nbsp;</span>
301<span class="cline-any cline-neutral">&nbsp;</span>
302<span class="cline-any cline-neutral">&nbsp;</span>
303<span class="cline-any cline-no">&nbsp;</span>
304<span class="cline-any cline-no">&nbsp;</span>
305<span class="cline-any cline-neutral">&nbsp;</span>
306<span class="cline-any cline-neutral">&nbsp;</span>
307<span class="cline-any cline-no">&nbsp;</span>
308<span class="cline-any cline-neutral">&nbsp;</span>
309<span class="cline-any cline-neutral">&nbsp;</span>
310<span class="cline-any cline-no">&nbsp;</span>
311<span class="cline-any cline-no">&nbsp;</span>
312<span class="cline-any cline-neutral">&nbsp;</span>
313<span class="cline-any cline-neutral">&nbsp;</span>
314<span class="cline-any cline-no">&nbsp;</span>
315<span class="cline-any cline-no">&nbsp;</span>
316<span class="cline-any cline-no">&nbsp;</span>
317<span class="cline-any cline-neutral">&nbsp;</span>
318<span class="cline-any cline-neutral">&nbsp;</span>
319<span class="cline-any cline-neutral">&nbsp;</span>
320<span class="cline-any cline-no">&nbsp;</span>
321<span class="cline-any cline-neutral">&nbsp;</span>
322<span class="cline-any cline-neutral">&nbsp;</span>
323<span class="cline-any cline-no">&nbsp;</span>
324<span class="cline-any cline-no">&nbsp;</span>
325<span class="cline-any cline-neutral">&nbsp;</span>
326<span class="cline-any cline-neutral">&nbsp;</span>
327<span class="cline-any cline-neutral">&nbsp;</span>
328<span class="cline-any cline-no">&nbsp;</span>
329<span class="cline-any cline-neutral">&nbsp;</span>
330<span class="cline-any cline-neutral">&nbsp;</span>
331<span class="cline-any cline-neutral">&nbsp;</span>
332<span class="cline-any cline-no">&nbsp;</span>
333<span class="cline-any cline-no">&nbsp;</span>
334<span class="cline-any cline-neutral">&nbsp;</span>
335<span class="cline-any cline-neutral">&nbsp;</span>
336<span class="cline-any cline-no">&nbsp;</span>
337<span class="cline-any cline-neutral">&nbsp;</span>
338<span class="cline-any cline-no">&nbsp;</span>
339<span class="cline-any cline-neutral">&nbsp;</span>
340<span class="cline-any cline-neutral">&nbsp;</span>
341<span class="cline-any cline-neutral">&nbsp;</span>
342<span class="cline-any cline-neutral">&nbsp;</span>
343<span class="cline-any cline-no">&nbsp;</span>
344<span class="cline-any cline-neutral">&nbsp;</span>
345<span class="cline-any cline-no">&nbsp;</span>
346<span class="cline-any cline-neutral">&nbsp;</span>
347<span class="cline-any cline-neutral">&nbsp;</span>
348<span class="cline-any cline-no">&nbsp;</span>
349<span class="cline-any cline-neutral">&nbsp;</span>
350<span class="cline-any cline-no">&nbsp;</span>
351<span class="cline-any cline-neutral">&nbsp;</span>
352<span class="cline-any cline-neutral">&nbsp;</span>
353<span class="cline-any cline-no">&nbsp;</span>
354<span class="cline-any cline-neutral">&nbsp;</span>
355<span class="cline-any cline-neutral">&nbsp;</span>
356<span class="cline-any cline-neutral">&nbsp;</span>
357<span class="cline-any cline-neutral">&nbsp;</span>
358<span class="cline-any cline-no">&nbsp;</span>
359<span class="cline-any cline-neutral">&nbsp;</span>
360<span class="cline-any cline-neutral">&nbsp;</span>
361<span class="cline-any cline-yes">1x</span>
362<span class="cline-any cline-neutral">&nbsp;</span>
363<span class="cline-any cline-no">&nbsp;</span>
364<span class="cline-any cline-neutral">&nbsp;</span>
365<span class="cline-any cline-neutral">&nbsp;</span>
366<span class="cline-any cline-neutral">&nbsp;</span>
367<span class="cline-any cline-no">&nbsp;</span>
368<span class="cline-any cline-no">&nbsp;</span>
369<span class="cline-any cline-neutral">&nbsp;</span>
370<span class="cline-any cline-no">&nbsp;</span>
371<span class="cline-any cline-no">&nbsp;</span>
372<span class="cline-any cline-no">&nbsp;</span>
373<span class="cline-any cline-no">&nbsp;</span>
374<span class="cline-any cline-neutral">&nbsp;</span>
375<span class="cline-any cline-neutral">&nbsp;</span>
376<span class="cline-any cline-neutral">&nbsp;</span>
377<span class="cline-any cline-neutral">&nbsp;</span>
378<span class="cline-any cline-neutral">&nbsp;</span>
379<span class="cline-any cline-no">&nbsp;</span>
380<span class="cline-any cline-neutral">&nbsp;</span>
381<span class="cline-any cline-neutral">&nbsp;</span>
382<span class="cline-any cline-neutral">&nbsp;</span>
383<span class="cline-any cline-neutral">&nbsp;</span>
384<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">/*!
385 * https://github.com/paulmillr/es6-shim
386 * @license es6-shim Copyright 2013-2016 by Paul Miller (http://paulmillr.com)
387 * and contributors, MIT License
388 * es6-sham: v0.35.4
389 * see https://github.com/paulmillr/es6-shim/blob/0.35.3/LICENSE
390 * Details and documentation:
391 * https://github.com/paulmillr/es6-shim/
392 */
393&nbsp;
394// UMD (Universal Module Definition)
395// see https://github.com/umdjs/umd/blob/master/returnExports.js
396(function (root, factory) {
397 /*global define */
398 <span class="missing-if-branch" title="if path not taken" >I</span>if (typeof define === 'function' &amp;&amp; <span class="branch-1 cbranch-no" title="branch not covered" >define.amd)</span> {
399 // AMD. Register as an anonymous module.
400<span class="cstat-no" title="statement not covered" > define(factory);</span>
401 } else <span class="missing-if-branch" title="else path not taken" >E</span>if (typeof exports === 'object') {
402 // Node. Does not work with strict CommonJS, but
403 // only CommonJS-like environments that support module.exports,
404 // like Node.
405 module.exports = factory();
406 } else {
407 // Browser globals (root is window)
408<span class="cstat-no" title="statement not covered" > root.returnExports = factory();</span>
409 }
410}(this, function () {
411 'use strict';
412&nbsp;
413 /* eslint-disable no-new-func */
414 var getGlobal = new Function('return this;');
415 /* eslint-enable no-new-func */
416&nbsp;
417 var globals = getGlobal();
418 var Object = globals.Object;
419 var _call = Function.call.bind(Function.call);
420 var functionToString = Function.toString;
421 var _strMatch = String.prototype.match;
422&nbsp;
423 var throwsError = function (func) {
424 try {
425 func();
426 return false;
427 } catch (e) {
428<span class="cstat-no" title="statement not covered" > return true;</span>
429 }
430 };
431 var arePropertyDescriptorsSupported = function () {
432 // if Object.defineProperty exists but throws, it's IE 8
433 return !throwsError(function () {
434 Object.defineProperty({}, 'x', { get: <span class="fstat-no" title="function not covered" >fu</span>nction () {} }); // eslint-disable-line getter-return
435 });
436 };
437 var supportsDescriptors = !!Object.defineProperty &amp;&amp; arePropertyDescriptorsSupported();
438&nbsp;
439 // NOTE: This versions needs object ownership
440 // because every promoted object needs to be reassigned
441 // otherwise uncompatible browsers cannot work as expected
442 //
443 // NOTE: This might need es5-shim or polyfills upfront
444 // because it's based on ES5 API.
445 // (probably just an IE &lt;= 8 problem)
446 //
447 // NOTE: nodejs is fine in version 0.8, 0.10, and future versions.
448 (function () {
449 <span class="missing-if-branch" title="else path not taken" >E</span>if (Object.setPrototypeOf) { return; }
450&nbsp;
451 // @author Andrea Giammarchi - @WebReflection
452&nbsp;
453 var getOwnPropertyNames = <span class="cstat-no" title="statement not covered" >Object.getOwnPropertyNames;</span>
454 var getOwnPropertyDescriptor = <span class="cstat-no" title="statement not covered" >Object.getOwnPropertyDescriptor;</span>
455 var create = <span class="cstat-no" title="statement not covered" >Object.create;</span>
456 var defineProperty = <span class="cstat-no" title="statement not covered" >Object.defineProperty;</span>
457 var getPrototypeOf = <span class="cstat-no" title="statement not covered" >Object.getPrototypeOf;</span>
458 var objProto = <span class="cstat-no" title="statement not covered" >Object.prototype;</span>
459&nbsp;
460 var copyDescriptors = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >fu</span>nction (target, source) {</span>
461 // define into target descriptors from source
462<span class="cstat-no" title="statement not covered" > getOwnPropertyNames(source).forEach(<span class="fstat-no" title="function not covered" >fu</span>nction (key) {</span>
463<span class="cstat-no" title="statement not covered" > defineProperty(</span>
464 target,
465 key,
466 getOwnPropertyDescriptor(source, key)
467 );
468 });
469<span class="cstat-no" title="statement not covered" > return target;</span>
470 };
471 // used as fallback when no promotion is possible
472 var createAndCopy = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >fu</span>nction (origin, proto) {</span>
473<span class="cstat-no" title="statement not covered" > return copyDescriptors(create(proto), origin);</span>
474 };
475 var set, setPrototypeOf;
476<span class="cstat-no" title="statement not covered" > try {</span>
477 // this might fail for various reasons
478 // ignore if Chrome cought it at runtime
479<span class="cstat-no" title="statement not covered" > set = getOwnPropertyDescriptor(objProto, '__proto__').set;</span>
480<span class="cstat-no" title="statement not covered" > set.call({}, null);</span>
481 // setter not poisoned, it can promote
482 // Firefox, Chrome
483<span class="cstat-no" title="statement not covered" > setPrototypeOf = <span class="fstat-no" title="function not covered" >fu</span>nction (origin, proto) {</span>
484<span class="cstat-no" title="statement not covered" > set.call(origin, proto);</span>
485<span class="cstat-no" title="statement not covered" > return origin;</span>
486 };
487 } catch (e) {
488 // do one or more feature detections
489<span class="cstat-no" title="statement not covered" > set = { __proto__: null };</span>
490 // if proto does not work, needs to fallback
491 // some Opera, Rhino, ducktape
492<span class="cstat-no" title="statement not covered" > if (set instanceof Object) {</span>
493<span class="cstat-no" title="statement not covered" > setPrototypeOf = createAndCopy;</span>
494 } else {
495 // verify if null objects are buggy
496 /* eslint-disable no-proto */
497<span class="cstat-no" title="statement not covered" > set.__proto__ = objProto;</span>
498 /* eslint-enable no-proto */
499 // if null objects are buggy
500 // nodejs 0.8 to 0.10
501<span class="cstat-no" title="statement not covered" > if (set instanceof Object) {</span>
502<span class="cstat-no" title="statement not covered" > setPrototypeOf = <span class="fstat-no" title="function not covered" >fu</span>nction (origin, proto) {</span>
503 // use such bug to promote
504 /* eslint-disable no-proto */
505<span class="cstat-no" title="statement not covered" > origin.__proto__ = proto;</span>
506 /* eslint-enable no-proto */
507<span class="cstat-no" title="statement not covered" > return origin;</span>
508 };
509 } else {
510 // try to use proto or fallback
511 // Safari, old Firefox, many others
512<span class="cstat-no" title="statement not covered" > setPrototypeOf = <span class="fstat-no" title="function not covered" >fu</span>nction (origin, proto) {</span>
513 // if proto is not null
514<span class="cstat-no" title="statement not covered" > if (getPrototypeOf(origin)) {</span>
515 // use __proto__ to promote
516 /* eslint-disable no-proto */
517<span class="cstat-no" title="statement not covered" > origin.__proto__ = proto;</span>
518 /* eslint-enable no-proto */
519<span class="cstat-no" title="statement not covered" > return origin;</span>
520 }
521 // otherwise unable to promote: fallback
522<span class="cstat-no" title="statement not covered" > return createAndCopy(origin, proto);</span>
523 };
524 }
525 }
526 }
527<span class="cstat-no" title="statement not covered" > Object.setPrototypeOf = setPrototypeOf;</span>
528 }());
529&nbsp;
530 <span class="missing-if-branch" title="if path not taken" >I</span>if (supportsDescriptors &amp;&amp; function <span class="fstat-no" title="function not covered" >foo(</span>) {}.name !== 'foo') {
531 /* eslint no-extend-native: 1 */
532<span class="cstat-no" title="statement not covered" > Object.defineProperty(Function.prototype, 'name', {</span>
533 configurable: true,
534 enumerable: false,
535 get: <span class="fstat-no" title="function not covered" >fu</span>nction () {
536<span class="cstat-no" title="statement not covered" > if (this === Function.prototype) {</span>
537<span class="cstat-no" title="statement not covered" > return '';</span>
538 }
539 var str = <span class="cstat-no" title="statement not covered" >_call(functionToString, this);</span>
540 var match = <span class="cstat-no" title="statement not covered" >_call(_strMatch, str, /\s*function\s+([^(\s]*)\s*/);</span>
541 var name = <span class="cstat-no" title="statement not covered" >match &amp;&amp; match[1];</span>
542<span class="cstat-no" title="statement not covered" > Object.defineProperty(this, 'name', {</span>
543 configurable: true,
544 enumerable: false,
545 writable: false,
546 value: name
547 });
548<span class="cstat-no" title="statement not covered" > return name;</span>
549 }
550 });
551 }
552}));
553&nbsp;</pre></td></tr>
554</table></pre>
555<div class='push'></div><!-- for sticky footer -->
556</div><!-- /wrapper -->
557<div class='footer quiet pad2 space-top1 center small'>
558 Code coverage
559 generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Thu Mar 23 2023 11:54:14 GMT-0700 (Pacific Daylight Time)
560</div>
561</div>
562<script src="prettify.js"></script>
563<script>
564window.onload = function () {
565 if (typeof prettyPrint === 'function') {
566 prettyPrint();
567 }
568};
569</script>
570<script src="sorter.js"></script>
571</body>
572</html>