@pixwel/pixwel-sdk 2.1.21 → 2.1.23
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/index.js +9 -0
- package/dist/src/Ingest.js +1 -0
- package/index.js +1 -0
- package/package.json +3 -2
- package/src/Ingest.js +1 -0
- package/.vs/slnx.sqlite +0 -0
- package/coverage/clover.xml +0 -628
- package/coverage/coverage-final.json +0 -16
- package/coverage/lcov-report/Ass.js.html +0 -651
- package/coverage/lcov-report/Asset.js.html +0 -129
- package/coverage/lcov-report/AssetType.js.html +0 -102
- package/coverage/lcov-report/Encode.js.html +0 -102
- package/coverage/lcov-report/File.js.html +0 -102
- package/coverage/lcov-report/Filename.js.html +0 -96
- package/coverage/lcov-report/Ingest.js.html +0 -2064
- package/coverage/lcov-report/IngestFile.js.html +0 -87
- package/coverage/lcov-report/IngestFileDrop.js.html +0 -540
- package/coverage/lcov-report/Model.js.html +0 -825
- package/coverage/lcov-report/Order.js.html +0 -198
- package/coverage/lcov-report/Srt.js.html +0 -333
- package/coverage/lcov-report/Sub.js.html +0 -177
- package/coverage/lcov-report/Tag.js.html +0 -102
- package/coverage/lcov-report/TimeFormat.js.html +0 -210
- package/coverage/lcov-report/base.css +0 -223
- package/coverage/lcov-report/block-navigation.js +0 -63
- package/coverage/lcov-report/fileType.js.html +0 -192
- package/coverage/lcov-report/index.html +0 -279
- package/coverage/lcov-report/lib/Filename.js.html +0 -720
- package/coverage/lcov-report/lib/index.html +0 -97
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -1
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -158
- package/coverage/lcov-report/test/index.html +0 -97
- package/coverage/lcov-report/test/mocks.js.html +0 -423
- package/coverage/lcov.info +0 -1289
- package/npm-update.sh +0 -8
- package/test/mocks/mediainfo-4x3.mock.js +0 -76
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
body, html {
|
|
2
|
-
margin:0; padding: 0;
|
|
3
|
-
height: 100%;
|
|
4
|
-
}
|
|
5
|
-
body {
|
|
6
|
-
font-family: Helvetica Neue, Helvetica, Arial;
|
|
7
|
-
font-size: 14px;
|
|
8
|
-
color:#333;
|
|
9
|
-
}
|
|
10
|
-
.small { font-size: 12px; }
|
|
11
|
-
*, *:after, *:before {
|
|
12
|
-
-webkit-box-sizing:border-box;
|
|
13
|
-
-moz-box-sizing:border-box;
|
|
14
|
-
box-sizing:border-box;
|
|
15
|
-
}
|
|
16
|
-
h1 { font-size: 20px; margin: 0;}
|
|
17
|
-
h2 { font-size: 14px; }
|
|
18
|
-
pre {
|
|
19
|
-
font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
20
|
-
margin: 0;
|
|
21
|
-
padding: 0;
|
|
22
|
-
-moz-tab-size: 2;
|
|
23
|
-
-o-tab-size: 2;
|
|
24
|
-
tab-size: 2;
|
|
25
|
-
}
|
|
26
|
-
a { color:#0074D9; text-decoration:none; }
|
|
27
|
-
a:hover { text-decoration:underline; }
|
|
28
|
-
.strong { font-weight: bold; }
|
|
29
|
-
.space-top1 { padding: 10px 0 0 0; }
|
|
30
|
-
.pad2y { padding: 20px 0; }
|
|
31
|
-
.pad1y { padding: 10px 0; }
|
|
32
|
-
.pad2x { padding: 0 20px; }
|
|
33
|
-
.pad2 { padding: 20px; }
|
|
34
|
-
.pad1 { padding: 10px; }
|
|
35
|
-
.space-left2 { padding-left:55px; }
|
|
36
|
-
.space-right2 { padding-right:20px; }
|
|
37
|
-
.center { text-align:center; }
|
|
38
|
-
.clearfix { display:block; }
|
|
39
|
-
.clearfix:after {
|
|
40
|
-
content:'';
|
|
41
|
-
display:block;
|
|
42
|
-
height:0;
|
|
43
|
-
clear:both;
|
|
44
|
-
visibility:hidden;
|
|
45
|
-
}
|
|
46
|
-
.fl { float: left; }
|
|
47
|
-
@media only screen and (max-width:640px) {
|
|
48
|
-
.col3 { width:100%; max-width:100%; }
|
|
49
|
-
.hide-mobile { display:none!important; }
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.quiet {
|
|
53
|
-
color: #7f7f7f;
|
|
54
|
-
color: rgba(0,0,0,0.5);
|
|
55
|
-
}
|
|
56
|
-
.quiet a { opacity: 0.7; }
|
|
57
|
-
|
|
58
|
-
.fraction {
|
|
59
|
-
font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
|
|
60
|
-
font-size: 10px;
|
|
61
|
-
color: #555;
|
|
62
|
-
background: #E8E8E8;
|
|
63
|
-
padding: 4px 5px;
|
|
64
|
-
border-radius: 3px;
|
|
65
|
-
vertical-align: middle;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
div.path a:link, div.path a:visited { color: #333; }
|
|
69
|
-
table.coverage {
|
|
70
|
-
border-collapse: collapse;
|
|
71
|
-
margin: 10px 0 0 0;
|
|
72
|
-
padding: 0;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
table.coverage td {
|
|
76
|
-
margin: 0;
|
|
77
|
-
padding: 0;
|
|
78
|
-
vertical-align: top;
|
|
79
|
-
}
|
|
80
|
-
table.coverage td.line-count {
|
|
81
|
-
text-align: right;
|
|
82
|
-
padding: 0 5px 0 20px;
|
|
83
|
-
}
|
|
84
|
-
table.coverage td.line-coverage {
|
|
85
|
-
text-align: right;
|
|
86
|
-
padding-right: 10px;
|
|
87
|
-
min-width:20px;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
table.coverage td span.cline-any {
|
|
91
|
-
display: inline-block;
|
|
92
|
-
padding: 0 5px;
|
|
93
|
-
width: 100%;
|
|
94
|
-
}
|
|
95
|
-
.missing-if-branch {
|
|
96
|
-
display: inline-block;
|
|
97
|
-
margin-right: 5px;
|
|
98
|
-
border-radius: 3px;
|
|
99
|
-
position: relative;
|
|
100
|
-
padding: 0 4px;
|
|
101
|
-
background: #333;
|
|
102
|
-
color: yellow;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.skip-if-branch {
|
|
106
|
-
display: none;
|
|
107
|
-
margin-right: 10px;
|
|
108
|
-
position: relative;
|
|
109
|
-
padding: 0 4px;
|
|
110
|
-
background: #ccc;
|
|
111
|
-
color: white;
|
|
112
|
-
}
|
|
113
|
-
.missing-if-branch .typ, .skip-if-branch .typ {
|
|
114
|
-
color: inherit !important;
|
|
115
|
-
}
|
|
116
|
-
.coverage-summary {
|
|
117
|
-
border-collapse: collapse;
|
|
118
|
-
width: 100%;
|
|
119
|
-
}
|
|
120
|
-
.coverage-summary tr { border-bottom: 1px solid #bbb; }
|
|
121
|
-
.keyline-all { border: 1px solid #ddd; }
|
|
122
|
-
.coverage-summary td, .coverage-summary th { padding: 10px; }
|
|
123
|
-
.coverage-summary tbody { border: 1px solid #bbb; }
|
|
124
|
-
.coverage-summary td { border-right: 1px solid #bbb; }
|
|
125
|
-
.coverage-summary td:last-child { border-right: none; }
|
|
126
|
-
.coverage-summary th {
|
|
127
|
-
text-align: left;
|
|
128
|
-
font-weight: normal;
|
|
129
|
-
white-space: nowrap;
|
|
130
|
-
}
|
|
131
|
-
.coverage-summary th.file { border-right: none !important; }
|
|
132
|
-
.coverage-summary th.pct { }
|
|
133
|
-
.coverage-summary th.pic,
|
|
134
|
-
.coverage-summary th.abs,
|
|
135
|
-
.coverage-summary td.pct,
|
|
136
|
-
.coverage-summary td.abs { text-align: right; }
|
|
137
|
-
.coverage-summary td.file { white-space: nowrap; }
|
|
138
|
-
.coverage-summary td.pic { min-width: 120px !important; }
|
|
139
|
-
.coverage-summary tfoot td { }
|
|
140
|
-
|
|
141
|
-
.coverage-summary .sorter {
|
|
142
|
-
height: 10px;
|
|
143
|
-
width: 7px;
|
|
144
|
-
display: inline-block;
|
|
145
|
-
margin-left: 0.5em;
|
|
146
|
-
background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
|
|
147
|
-
}
|
|
148
|
-
.coverage-summary .sorted .sorter {
|
|
149
|
-
background-position: 0 -20px;
|
|
150
|
-
}
|
|
151
|
-
.coverage-summary .sorted-desc .sorter {
|
|
152
|
-
background-position: 0 -10px;
|
|
153
|
-
}
|
|
154
|
-
.status-line { height: 10px; }
|
|
155
|
-
/* yellow */
|
|
156
|
-
.cbranch-no { background: yellow !important; color: #111; }
|
|
157
|
-
/* dark red */
|
|
158
|
-
.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 }
|
|
159
|
-
.low .chart { border:1px solid #C21F39 }
|
|
160
|
-
.highlighted,
|
|
161
|
-
.highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no{
|
|
162
|
-
background: #C21F39 !important;
|
|
163
|
-
}
|
|
164
|
-
/* medium red */
|
|
165
|
-
.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE }
|
|
166
|
-
/* light red */
|
|
167
|
-
.low, .cline-no { background:#FCE1E5 }
|
|
168
|
-
/* light green */
|
|
169
|
-
.high, .cline-yes { background:rgb(230,245,208) }
|
|
170
|
-
/* medium green */
|
|
171
|
-
.cstat-yes { background:rgb(161,215,106) }
|
|
172
|
-
/* dark green */
|
|
173
|
-
.status-line.high, .high .cover-fill { background:rgb(77,146,33) }
|
|
174
|
-
.high .chart { border:1px solid rgb(77,146,33) }
|
|
175
|
-
|
|
176
|
-
.medium .chart { border:1px solid #666; }
|
|
177
|
-
.medium .cover-fill { background: #666; }
|
|
178
|
-
|
|
179
|
-
.cstat-skip { background: #ddd; color: #111; }
|
|
180
|
-
.fstat-skip { background: #ddd; color: #111 !important; }
|
|
181
|
-
.cbranch-skip { background: #ddd !important; color: #111; }
|
|
182
|
-
|
|
183
|
-
span.cline-neutral { background: #eaeaea; }
|
|
184
|
-
.medium { background: #eaeaea; }
|
|
185
|
-
|
|
186
|
-
.coverage-summary td.empty {
|
|
187
|
-
opacity: .5;
|
|
188
|
-
padding-top: 4px;
|
|
189
|
-
padding-bottom: 4px;
|
|
190
|
-
line-height: 1;
|
|
191
|
-
color: #888;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.cover-fill, .cover-empty {
|
|
195
|
-
display:inline-block;
|
|
196
|
-
height: 12px;
|
|
197
|
-
}
|
|
198
|
-
.chart {
|
|
199
|
-
line-height: 0;
|
|
200
|
-
}
|
|
201
|
-
.cover-empty {
|
|
202
|
-
background: white;
|
|
203
|
-
}
|
|
204
|
-
.cover-full {
|
|
205
|
-
border-right: none !important;
|
|
206
|
-
}
|
|
207
|
-
pre.prettyprint {
|
|
208
|
-
border: none !important;
|
|
209
|
-
padding: 0 !important;
|
|
210
|
-
margin: 0 !important;
|
|
211
|
-
}
|
|
212
|
-
.com { color: #999 !important; }
|
|
213
|
-
.ignore-none { color: #999; font-weight: normal; }
|
|
214
|
-
|
|
215
|
-
.wrapper {
|
|
216
|
-
min-height: 100%;
|
|
217
|
-
height: auto !important;
|
|
218
|
-
height: 100%;
|
|
219
|
-
margin: 0 auto -48px;
|
|
220
|
-
}
|
|
221
|
-
.footer, .push {
|
|
222
|
-
height: 48px;
|
|
223
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
var jumpToCode = (function init () {
|
|
2
|
-
// Classes of code we would like to highlight
|
|
3
|
-
var missingCoverageClasses = [ '.cbranch-no', '.cstat-no', '.fstat-no' ];
|
|
4
|
-
|
|
5
|
-
// We don't want to select elements that are direct descendants of another match
|
|
6
|
-
var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > `
|
|
7
|
-
|
|
8
|
-
// Selecter that finds elements on the page to which we can jump
|
|
9
|
-
var selector = notSelector + missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
|
|
10
|
-
|
|
11
|
-
// The NodeList of matching elements
|
|
12
|
-
var missingCoverageElements = document.querySelectorAll(selector);
|
|
13
|
-
|
|
14
|
-
var currentIndex;
|
|
15
|
-
|
|
16
|
-
function toggleClass(index) {
|
|
17
|
-
missingCoverageElements.item(currentIndex).classList.remove('highlighted');
|
|
18
|
-
missingCoverageElements.item(index).classList.add('highlighted');
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function makeCurrent(index) {
|
|
22
|
-
toggleClass(index);
|
|
23
|
-
currentIndex = index;
|
|
24
|
-
missingCoverageElements.item(index)
|
|
25
|
-
.scrollIntoView({ behavior: 'smooth', block: 'center', inline: 'center' });
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function goToPrevious() {
|
|
29
|
-
var nextIndex = 0;
|
|
30
|
-
if (typeof currentIndex !== 'number' || currentIndex === 0) {
|
|
31
|
-
nextIndex = missingCoverageElements.length - 1;
|
|
32
|
-
} else if (missingCoverageElements.length > 1) {
|
|
33
|
-
nextIndex = currentIndex - 1;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
makeCurrent(nextIndex);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function goToNext() {
|
|
40
|
-
var nextIndex = 0;
|
|
41
|
-
|
|
42
|
-
if (typeof currentIndex === 'number' && currentIndex < (missingCoverageElements.length - 1)) {
|
|
43
|
-
nextIndex = currentIndex + 1;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
makeCurrent(nextIndex);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
return function jump(event) {
|
|
50
|
-
switch (event.which) {
|
|
51
|
-
case 78: // n
|
|
52
|
-
case 74: // j
|
|
53
|
-
goToNext();
|
|
54
|
-
break;
|
|
55
|
-
case 66: // b
|
|
56
|
-
case 75: // k
|
|
57
|
-
case 80: // p
|
|
58
|
-
goToPrevious();
|
|
59
|
-
break;
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
}());
|
|
63
|
-
window.addEventListener('keydown', jumpToCode);
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<title>Code coverage report for fileType.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> fileType.js
|
|
20
|
-
</h1>
|
|
21
|
-
<div class='clearfix'>
|
|
22
|
-
<div class='fl pad1y space-right2'>
|
|
23
|
-
<span class="strong">27.27% </span>
|
|
24
|
-
<span class="quiet">Statements</span>
|
|
25
|
-
<span class='fraction'>3/11</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/4</span>
|
|
31
|
-
</div>
|
|
32
|
-
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">0% </span>
|
|
34
|
-
<span class="quiet">Functions</span>
|
|
35
|
-
<span class='fraction'>0/3</span>
|
|
36
|
-
</div>
|
|
37
|
-
<div class='fl pad1y space-right2'>
|
|
38
|
-
<span class="strong">27.27% </span>
|
|
39
|
-
<span class="quiet">Lines</span>
|
|
40
|
-
<span class='fraction'>3/11</span>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
<p class="quiet">
|
|
44
|
-
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
45
|
-
</p>
|
|
46
|
-
</div>
|
|
47
|
-
<div class='status-line low'></div>
|
|
48
|
-
<pre><table class="coverage">
|
|
49
|
-
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
50
|
-
<a name='L2'></a><a href='#L2'>2</a>
|
|
51
|
-
<a name='L3'></a><a href='#L3'>3</a>
|
|
52
|
-
<a name='L4'></a><a href='#L4'>4</a>
|
|
53
|
-
<a name='L5'></a><a href='#L5'>5</a>
|
|
54
|
-
<a name='L6'></a><a href='#L6'>6</a>
|
|
55
|
-
<a name='L7'></a><a href='#L7'>7</a>
|
|
56
|
-
<a name='L8'></a><a href='#L8'>8</a>
|
|
57
|
-
<a name='L9'></a><a href='#L9'>9</a>
|
|
58
|
-
<a name='L10'></a><a href='#L10'>10</a>
|
|
59
|
-
<a name='L11'></a><a href='#L11'>11</a>
|
|
60
|
-
<a name='L12'></a><a href='#L12'>12</a>
|
|
61
|
-
<a name='L13'></a><a href='#L13'>13</a>
|
|
62
|
-
<a name='L14'></a><a href='#L14'>14</a>
|
|
63
|
-
<a name='L15'></a><a href='#L15'>15</a>
|
|
64
|
-
<a name='L16'></a><a href='#L16'>16</a>
|
|
65
|
-
<a name='L17'></a><a href='#L17'>17</a>
|
|
66
|
-
<a name='L18'></a><a href='#L18'>18</a>
|
|
67
|
-
<a name='L19'></a><a href='#L19'>19</a>
|
|
68
|
-
<a name='L20'></a><a href='#L20'>20</a>
|
|
69
|
-
<a name='L21'></a><a href='#L21'>21</a>
|
|
70
|
-
<a name='L22'></a><a href='#L22'>22</a>
|
|
71
|
-
<a name='L23'></a><a href='#L23'>23</a>
|
|
72
|
-
<a name='L24'></a><a href='#L24'>24</a>
|
|
73
|
-
<a name='L25'></a><a href='#L25'>25</a>
|
|
74
|
-
<a name='L26'></a><a href='#L26'>26</a>
|
|
75
|
-
<a name='L27'></a><a href='#L27'>27</a>
|
|
76
|
-
<a name='L28'></a><a href='#L28'>28</a>
|
|
77
|
-
<a name='L29'></a><a href='#L29'>29</a>
|
|
78
|
-
<a name='L30'></a><a href='#L30'>30</a>
|
|
79
|
-
<a name='L31'></a><a href='#L31'>31</a>
|
|
80
|
-
<a name='L32'></a><a href='#L32'>32</a>
|
|
81
|
-
<a name='L33'></a><a href='#L33'>33</a>
|
|
82
|
-
<a name='L34'></a><a href='#L34'>34</a>
|
|
83
|
-
<a name='L35'></a><a href='#L35'>35</a>
|
|
84
|
-
<a name='L36'></a><a href='#L36'>36</a>
|
|
85
|
-
<a name='L37'></a><a href='#L37'>37</a>
|
|
86
|
-
<a name='L38'></a><a href='#L38'>38</a>
|
|
87
|
-
<a name='L39'></a><a href='#L39'>39</a>
|
|
88
|
-
<a name='L40'></a><a href='#L40'>40</a>
|
|
89
|
-
<a name='L41'></a><a href='#L41'>41</a>
|
|
90
|
-
<a name='L42'></a><a href='#L42'>42</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">2x</span>
|
|
91
|
-
<span class="cline-any cline-neutral"> </span>
|
|
92
|
-
<span class="cline-any cline-yes">2x</span>
|
|
93
|
-
<span class="cline-any cline-neutral"> </span>
|
|
94
|
-
<span class="cline-any cline-neutral"> </span>
|
|
95
|
-
<span class="cline-any cline-neutral"> </span>
|
|
96
|
-
<span class="cline-any cline-neutral"> </span>
|
|
97
|
-
<span class="cline-any cline-neutral"> </span>
|
|
98
|
-
<span class="cline-any cline-neutral"> </span>
|
|
99
|
-
<span class="cline-any cline-neutral"> </span>
|
|
100
|
-
<span class="cline-any cline-neutral"> </span>
|
|
101
|
-
<span class="cline-any cline-neutral"> </span>
|
|
102
|
-
<span class="cline-any cline-neutral"> </span>
|
|
103
|
-
<span class="cline-any cline-neutral"> </span>
|
|
104
|
-
<span class="cline-any cline-neutral"> </span>
|
|
105
|
-
<span class="cline-any cline-no"> </span>
|
|
106
|
-
<span class="cline-any cline-no"> </span>
|
|
107
|
-
<span class="cline-any cline-no"> </span>
|
|
108
|
-
<span class="cline-any cline-neutral"> </span>
|
|
109
|
-
<span class="cline-any cline-neutral"> </span>
|
|
110
|
-
<span class="cline-any cline-neutral"> </span>
|
|
111
|
-
<span class="cline-any cline-neutral"> </span>
|
|
112
|
-
<span class="cline-any cline-neutral"> </span>
|
|
113
|
-
<span class="cline-any cline-no"> </span>
|
|
114
|
-
<span class="cline-any cline-neutral"> </span>
|
|
115
|
-
<span class="cline-any cline-neutral"> </span>
|
|
116
|
-
<span class="cline-any cline-neutral"> </span>
|
|
117
|
-
<span class="cline-any cline-no"> </span>
|
|
118
|
-
<span class="cline-any cline-neutral"> </span>
|
|
119
|
-
<span class="cline-any cline-no"> </span>
|
|
120
|
-
<span class="cline-any cline-no"> </span>
|
|
121
|
-
<span class="cline-any cline-neutral"> </span>
|
|
122
|
-
<span class="cline-any cline-neutral"> </span>
|
|
123
|
-
<span class="cline-any cline-no"> </span>
|
|
124
|
-
<span class="cline-any cline-neutral"> </span>
|
|
125
|
-
<span class="cline-any cline-neutral"> </span>
|
|
126
|
-
<span class="cline-any cline-yes">2x</span>
|
|
127
|
-
<span class="cline-any cline-neutral"> </span>
|
|
128
|
-
<span class="cline-any cline-neutral"> </span>
|
|
129
|
-
<span class="cline-any cline-neutral"> </span>
|
|
130
|
-
<span class="cline-any cline-neutral"> </span>
|
|
131
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">const extname = require("path").extname;
|
|
132
|
-
|
|
133
|
-
const TYPES = {
|
|
134
|
-
document: ["doc", "docx", "xls", "xlsx", "txt", "pdf", "ppt", "pptx"],
|
|
135
|
-
|
|
136
|
-
video: ["mov", "mp4", "m4v", "mpg", "mxf"],
|
|
137
|
-
|
|
138
|
-
audio: ["mp3", "wav", "m4a"],
|
|
139
|
-
|
|
140
|
-
image: ["jpg", "jpeg", "png", "tif", "tiff", "ai", "psd", "eps"],
|
|
141
|
-
|
|
142
|
-
zip: ["zip"]
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
function <span class="fstat-no" title="function not covered" >extensionType(</span>extension) {
|
|
146
|
-
<span class="cstat-no" title="statement not covered" > for (var type in TYPES) {</span>
|
|
147
|
-
<span class="cstat-no" title="statement not covered" > if (TYPES[type].indexOf(extension) > -1) {</span>
|
|
148
|
-
<span class="cstat-no" title="statement not covered" > return type;</span>
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
function <span class="fstat-no" title="function not covered" >extension(</span>path) {
|
|
154
|
-
<span class="cstat-no" title="statement not covered" > return extname(path.split("?")[0].toLowerCase()).substring(1);</span>
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
function <span class="fstat-no" title="function not covered" >mediaType(</span>path) {
|
|
158
|
-
var type = <span class="cstat-no" title="statement not covered" >extensionType(extension(path));</span>
|
|
159
|
-
|
|
160
|
-
<span class="cstat-no" title="statement not covered" > if (type) {</span>
|
|
161
|
-
<span class="cstat-no" title="statement not covered" > return type;</span>
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
<span class="cstat-no" title="statement not covered" > throw new Error(`Unknown extension '${extension}'`);</span>
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
module.exports = {
|
|
168
|
-
extension,
|
|
169
|
-
extensionType,
|
|
170
|
-
mediaType
|
|
171
|
-
};
|
|
172
|
-
</pre></td></tr>
|
|
173
|
-
</table></pre>
|
|
174
|
-
<div class='push'></div><!-- for sticky footer -->
|
|
175
|
-
</div><!-- /wrapper -->
|
|
176
|
-
<div class='footer quiet pad2 space-top1 center small'>
|
|
177
|
-
Code coverage
|
|
178
|
-
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Sat Sep 07 2019 18:03:07 GMT-0500 (Central Daylight Time)
|
|
179
|
-
</div>
|
|
180
|
-
</div>
|
|
181
|
-
<script src="prettify.js"></script>
|
|
182
|
-
<script>
|
|
183
|
-
window.onload = function () {
|
|
184
|
-
if (typeof prettyPrint === 'function') {
|
|
185
|
-
prettyPrint();
|
|
186
|
-
}
|
|
187
|
-
};
|
|
188
|
-
</script>
|
|
189
|
-
<script src="sorter.js"></script>
|
|
190
|
-
<script src="block-navigation.js"></script>
|
|
191
|
-
</body>
|
|
192
|
-
</html>
|