@pixwel/pixwel-sdk 2.1.33 → 2.1.35
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/coverage/clover.xml +309 -317
- package/coverage/coverage-final.json +11 -11
- package/coverage/lcov-report/Ass.js.html +1 -1
- package/coverage/lcov-report/Asset.js.html +4 -4
- package/coverage/lcov-report/AssetType.js.html +12 -12
- package/coverage/lcov-report/Encode.js.html +12 -12
- package/coverage/lcov-report/File.js.html +17 -17
- package/coverage/lcov-report/Filename.js.html +1 -1
- package/coverage/lcov-report/Ingest.js.html +521 -512
- package/coverage/lcov-report/IngestFile.js.html +5 -5
- package/coverage/lcov-report/Model.js.html +144 -144
- package/coverage/lcov-report/Order.js.html +43 -31
- package/coverage/lcov-report/Srt.js.html +1 -1
- package/coverage/lcov-report/Sub.js.html +1 -1
- package/coverage/lcov-report/Tag.js.html +12 -12
- package/coverage/lcov-report/TimeFormat.js.html +14 -14
- package/coverage/lcov-report/fileType.js.html +14 -14
- package/coverage/lcov-report/index.html +72 -72
- package/coverage/lcov.info +657 -724
- package/dist/src/Ingest.js +3 -0
- package/dist/src/Order.js +10 -2
- package/package.json +1 -1
- package/src/Ingest.js +3 -0
- package/src/Order.js +6 -2
- package/test/Order.spec.js +4 -10
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
</h1>
|
|
21
21
|
<div class='clearfix'>
|
|
22
22
|
<div class='fl pad1y space-right2'>
|
|
23
|
-
<span class="strong">
|
|
23
|
+
<span class="strong">75% </span>
|
|
24
24
|
<span class="quiet">Statements</span>
|
|
25
|
-
<span class='fraction'>
|
|
25
|
+
<span class='fraction'>12/16</span>
|
|
26
26
|
</div>
|
|
27
27
|
<div class='fl pad1y space-right2'>
|
|
28
|
-
<span class="strong">
|
|
28
|
+
<span class="strong">66.67% </span>
|
|
29
29
|
<span class="quiet">Branches</span>
|
|
30
|
-
<span class='fraction'>
|
|
30
|
+
<span class='fraction'>8/12</span>
|
|
31
31
|
</div>
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
33
|
<span class="strong">100% </span>
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
<span class='fraction'>3/3</span>
|
|
36
36
|
</div>
|
|
37
37
|
<div class='fl pad1y space-right2'>
|
|
38
|
-
<span class="strong">
|
|
38
|
+
<span class="strong">75% </span>
|
|
39
39
|
<span class="quiet">Lines</span>
|
|
40
|
-
<span class='fraction'>
|
|
40
|
+
<span class='fraction'>12/16</span>
|
|
41
41
|
</div>
|
|
42
42
|
</div>
|
|
43
43
|
</div>
|
|
44
|
-
<div class='status-line
|
|
44
|
+
<div class='status-line medium'></div>
|
|
45
45
|
<pre><table class="coverage">
|
|
46
46
|
<tr><td class="line-count quiet">1
|
|
47
47
|
2
|
|
@@ -86,12 +86,16 @@
|
|
|
86
86
|
41
|
|
87
87
|
42
|
|
88
88
|
43
|
|
89
|
-
44
|
|
89
|
+
44
|
|
90
|
+
45
|
|
91
|
+
46
|
|
92
|
+
47
|
|
93
|
+
48</td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
90
94
|
<span class="cline-any cline-neutral"> </span>
|
|
91
95
|
<span class="cline-any cline-neutral"> </span>
|
|
92
96
|
<span class="cline-any cline-neutral"> </span>
|
|
93
97
|
<span class="cline-any cline-neutral"> </span>
|
|
94
|
-
<span class="cline-any cline-yes">
|
|
98
|
+
<span class="cline-any cline-yes">4x</span>
|
|
95
99
|
<span class="cline-any cline-neutral"> </span>
|
|
96
100
|
<span class="cline-any cline-neutral"> </span>
|
|
97
101
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -100,34 +104,38 @@
|
|
|
100
104
|
<span class="cline-any cline-neutral"> </span>
|
|
101
105
|
<span class="cline-any cline-neutral"> </span>
|
|
102
106
|
<span class="cline-any cline-neutral"> </span>
|
|
103
|
-
<span class="cline-any cline-yes">
|
|
107
|
+
<span class="cline-any cline-yes">4x</span>
|
|
104
108
|
<span class="cline-any cline-neutral"> </span>
|
|
105
109
|
<span class="cline-any cline-neutral"> </span>
|
|
106
110
|
<span class="cline-any cline-neutral"> </span>
|
|
107
111
|
<span class="cline-any cline-neutral"> </span>
|
|
108
112
|
<span class="cline-any cline-neutral"> </span>
|
|
109
|
-
<span class="cline-any cline-yes">
|
|
110
|
-
<span class="cline-any cline-yes">22x</span>
|
|
111
|
-
<span class="cline-any cline-neutral"> </span>
|
|
112
|
-
<span class="cline-any cline-no"> </span>
|
|
113
|
-
<span class="cline-any cline-no"> </span>
|
|
113
|
+
<span class="cline-any cline-yes">2x</span>
|
|
114
114
|
<span class="cline-any cline-no"> </span>
|
|
115
115
|
<span class="cline-any cline-neutral"> </span>
|
|
116
|
+
<span class="cline-any cline-yes">2x</span>
|
|
116
117
|
<span class="cline-any cline-no"> </span>
|
|
117
|
-
<span class="cline-any cline-no"> </span>
|
|
118
118
|
<span class="cline-any cline-neutral"> </span>
|
|
119
|
+
<span class="cline-any cline-yes">2x</span>
|
|
120
|
+
<span class="cline-any cline-yes">1x</span>
|
|
121
|
+
<span class="cline-any cline-neutral"> </span>
|
|
122
|
+
<span class="cline-any cline-yes">1x</span>
|
|
119
123
|
<span class="cline-any cline-no"> </span>
|
|
120
124
|
<span class="cline-any cline-neutral"> </span>
|
|
125
|
+
<span class="cline-any cline-yes">1x</span>
|
|
121
126
|
<span class="cline-any cline-neutral"> </span>
|
|
122
127
|
<span class="cline-any cline-neutral"> </span>
|
|
123
128
|
<span class="cline-any cline-neutral"> </span>
|
|
124
129
|
<span class="cline-any cline-neutral"> </span>
|
|
125
|
-
<span class="cline-any cline-yes">33x</span>
|
|
126
|
-
<span class="cline-any cline-yes">33x</span>
|
|
127
130
|
<span class="cline-any cline-neutral"> </span>
|
|
128
|
-
<span class="cline-any cline-
|
|
131
|
+
<span class="cline-any cline-yes">2x</span>
|
|
129
132
|
<span class="cline-any cline-no"> </span>
|
|
130
133
|
<span class="cline-any cline-neutral"> </span>
|
|
134
|
+
<span class="cline-any cline-yes">2x</span>
|
|
135
|
+
<span class="cline-any cline-yes">1x</span>
|
|
136
|
+
<span class="cline-any cline-neutral"> </span>
|
|
137
|
+
<span class="cline-any cline-yes">1x</span>
|
|
138
|
+
<span class="cline-any cline-neutral"> </span>
|
|
131
139
|
<span class="cline-any cline-neutral"> </span>
|
|
132
140
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import _ from "lodash";
|
|
133
141
|
import Filename from "./Filename.js";
|
|
@@ -149,27 +157,31 @@ export default class Order {
|
|
|
149
157
|
* Determines if an order should be classified as 'dubbed' based on its dng values
|
|
150
158
|
*/
|
|
151
159
|
isDub() {
|
|
152
|
-
<span class="missing-if-branch" title="
|
|
153
|
-
return null
|
|
160
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (!this.dng) {
|
|
161
|
+
<span class="cstat-no" title="statement not covered" > return null;</span>
|
|
154
162
|
}
|
|
155
|
-
<span class="
|
|
156
|
-
<span class="cstat-no" title="statement not covered" >
|
|
157
|
-
<span class="cstat-no" title="statement not covered" > return true;</span>
|
|
163
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (typeof this.dng !== 'object') {
|
|
164
|
+
<span class="cstat-no" title="statement not covered" > return false;</span>
|
|
158
165
|
}
|
|
159
|
-
|
|
166
|
+
if (this.dng.dialogue.includes("Dedicated / Localized")) {
|
|
167
|
+
return true;
|
|
168
|
+
}
|
|
169
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (this.dng.narration.includes("Dedicated / Localized")) {
|
|
160
170
|
<span class="cstat-no" title="statement not covered" > return true;</span>
|
|
161
171
|
}
|
|
162
|
-
|
|
172
|
+
return false;
|
|
163
173
|
}
|
|
164
174
|
/**
|
|
165
175
|
* Determines in an order should be classified as 'subbed' based on its dng values
|
|
166
176
|
*/
|
|
167
177
|
isSub() {
|
|
168
|
-
<span class="missing-if-branch" title="
|
|
169
|
-
return null
|
|
178
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (!this.dng) {
|
|
179
|
+
<span class="cstat-no" title="statement not covered" > return null;</span>
|
|
180
|
+
}
|
|
181
|
+
if (this.dng === 'Subtitled') {
|
|
182
|
+
return true;
|
|
170
183
|
}
|
|
171
|
-
|
|
172
|
-
<span class="cstat-no" title="statement not covered" > return _.flattenDeep(Object.entries(this.dng)).includes("Subtitled");</span>
|
|
184
|
+
return _.flattenDeep(Object.entries(this.dng)).includes("Subtitled");
|
|
173
185
|
}
|
|
174
186
|
}
|
|
175
187
|
</pre></td></tr>
|
|
@@ -178,7 +190,7 @@ export default class Order {
|
|
|
178
190
|
</div><!-- /wrapper -->
|
|
179
191
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
180
192
|
Code coverage
|
|
181
|
-
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Wed Nov 27 2019
|
|
193
|
+
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Wed Nov 27 2019 12:25:59 GMT-0600 (Central Standard Time)
|
|
182
194
|
</div>
|
|
183
195
|
</div>
|
|
184
196
|
<script src="prettify.js"></script>
|
|
@@ -313,7 +313,7 @@ export default {
|
|
|
313
313
|
</div><!-- /wrapper -->
|
|
314
314
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
315
315
|
Code coverage
|
|
316
|
-
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Wed Nov 27 2019
|
|
316
|
+
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Wed Nov 27 2019 12:25:59 GMT-0600 (Central Standard Time)
|
|
317
317
|
</div>
|
|
318
318
|
</div>
|
|
319
319
|
<script src="prettify.js"></script>
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
</div><!-- /wrapper -->
|
|
158
158
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
159
159
|
Code coverage
|
|
160
|
-
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Wed Nov 27 2019
|
|
160
|
+
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Wed Nov 27 2019 12:25:59 GMT-0600 (Central Standard Time)
|
|
161
161
|
</div>
|
|
162
162
|
</div>
|
|
163
163
|
<script src="prettify.js"></script>
|
|
@@ -22,22 +22,22 @@
|
|
|
22
22
|
<div class='fl pad1y space-right2'>
|
|
23
23
|
<span class="strong">0% </span>
|
|
24
24
|
<span class="quiet">Statements</span>
|
|
25
|
-
<span class='fraction'>0/
|
|
25
|
+
<span class='fraction'>0/4</span>
|
|
26
26
|
</div>
|
|
27
27
|
<div class='fl pad1y space-right2'>
|
|
28
|
-
<span class="strong">
|
|
28
|
+
<span class="strong">0% </span>
|
|
29
29
|
<span class="quiet">Branches</span>
|
|
30
|
-
<span class='fraction'>0/
|
|
30
|
+
<span class='fraction'>0/2</span>
|
|
31
31
|
</div>
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
33
|
<span class="strong">0% </span>
|
|
34
34
|
<span class="quiet">Functions</span>
|
|
35
|
-
<span class='fraction'>0/
|
|
35
|
+
<span class='fraction'>0/1</span>
|
|
36
36
|
</div>
|
|
37
37
|
<div class='fl pad1y space-right2'>
|
|
38
38
|
<span class="strong">0% </span>
|
|
39
39
|
<span class="quiet">Lines</span>
|
|
40
|
-
<span class='fraction'>0/
|
|
40
|
+
<span class='fraction'>0/4</span>
|
|
41
41
|
</div>
|
|
42
42
|
</div>
|
|
43
43
|
</div>
|
|
@@ -54,25 +54,25 @@
|
|
|
54
54
|
9
|
|
55
55
|
10
|
|
56
56
|
11
|
|
57
|
-
12</td><td class="line-coverage quiet"><span class="cline-any cline-
|
|
58
|
-
<span class="cline-any cline-neutral"> </span>
|
|
57
|
+
12</td><td class="line-coverage quiet"><span class="cline-any cline-no"> </span>
|
|
59
58
|
<span class="cline-any cline-neutral"> </span>
|
|
60
59
|
<span class="cline-any cline-neutral"> </span>
|
|
61
60
|
<span class="cline-any cline-no"> </span>
|
|
61
|
+
<span class="cline-any cline-neutral"> </span>
|
|
62
62
|
<span class="cline-any cline-no"> </span>
|
|
63
63
|
<span class="cline-any cline-neutral"> </span>
|
|
64
64
|
<span class="cline-any cline-neutral"> </span>
|
|
65
65
|
<span class="cline-any cline-no"> </span>
|
|
66
66
|
<span class="cline-any cline-neutral"> </span>
|
|
67
67
|
<span class="cline-any cline-neutral"> </span>
|
|
68
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import Model from "./Model"
|
|
68
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js"><span class="cstat-no" title="statement not covered" >import Model from "./Model";</span>
|
|
69
69
|
|
|
70
70
|
export default class Tag extends Model {
|
|
71
|
-
<span class="fstat-no" title="function not covered" >
|
|
72
|
-
|
|
71
|
+
<span class="fstat-no" title="function not covered" > constructor(</span>data) <span class="cstat-no" title="statement not covered" >{</span>
|
|
72
|
+
super(data);
|
|
73
73
|
<span class="cstat-no" title="statement not covered" > this._resource = 'tags';</span>
|
|
74
74
|
}
|
|
75
|
-
|
|
75
|
+
static get _resource() {
|
|
76
76
|
<span class="cstat-no" title="statement not covered" > return 'tags';</span>
|
|
77
77
|
}
|
|
78
78
|
}
|
|
@@ -82,7 +82,7 @@ export default class Tag extends Model {
|
|
|
82
82
|
</div><!-- /wrapper -->
|
|
83
83
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
84
84
|
Code coverage
|
|
85
|
-
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Wed Nov 27 2019
|
|
85
|
+
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Wed Nov 27 2019 12:25:59 GMT-0600 (Central Standard Time)
|
|
86
86
|
</div>
|
|
87
87
|
</div>
|
|
88
88
|
<script src="prettify.js"></script>
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
</h1>
|
|
21
21
|
<div class='clearfix'>
|
|
22
22
|
<div class='fl pad1y space-right2'>
|
|
23
|
-
<span class="strong">
|
|
23
|
+
<span class="strong">0% </span>
|
|
24
24
|
<span class="quiet">Statements</span>
|
|
25
|
-
<span class='fraction'>
|
|
25
|
+
<span class='fraction'>0/23</span>
|
|
26
26
|
</div>
|
|
27
27
|
<div class='fl pad1y space-right2'>
|
|
28
28
|
<span class="strong">0% </span>
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
<span class='fraction'>0/7</span>
|
|
36
36
|
</div>
|
|
37
37
|
<div class='fl pad1y space-right2'>
|
|
38
|
-
<span class="strong">
|
|
38
|
+
<span class="strong">0% </span>
|
|
39
39
|
<span class="quiet">Lines</span>
|
|
40
|
-
<span class='fraction'>
|
|
40
|
+
<span class='fraction'>0/23</span>
|
|
41
41
|
</div>
|
|
42
42
|
</div>
|
|
43
43
|
</div>
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
45
|
|
91
91
|
46
|
|
92
92
|
47
|
|
93
|
-
48</td><td class="line-coverage quiet"><span class="cline-any cline-
|
|
93
|
+
48</td><td class="line-coverage quiet"><span class="cline-any cline-no"> </span>
|
|
94
94
|
<span class="cline-any cline-neutral"> </span>
|
|
95
95
|
<span class="cline-any cline-neutral"> </span>
|
|
96
96
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -137,13 +137,13 @@
|
|
|
137
137
|
<span class="cline-any cline-no"> </span>
|
|
138
138
|
<span class="cline-any cline-no"> </span>
|
|
139
139
|
<span class="cline-any cline-neutral"> </span>
|
|
140
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">var stringRegex =
|
|
140
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">var stringRegex = <span class="cstat-no" title="statement not covered" >/^(\d+):(\d+):(\d+)[,|.](\d{2,3})?$/;</span>
|
|
141
141
|
|
|
142
142
|
export default {
|
|
143
|
-
isValidTime: <span class="fstat-no" title="function not covered" >
|
|
143
|
+
isValidTime: <span class="fstat-no" title="function not covered" >function(</span>time) {
|
|
144
144
|
<span class="cstat-no" title="statement not covered" > return !!time.match(stringRegex);</span>
|
|
145
145
|
},
|
|
146
|
-
timeToTimestamp: <span class="fstat-no" title="function not covered" >
|
|
146
|
+
timeToTimestamp: <span class="fstat-no" title="function not covered" >function(</span>time) {
|
|
147
147
|
var match = <span class="cstat-no" title="statement not covered" >time.match(stringRegex);</span>
|
|
148
148
|
<span class="cstat-no" title="statement not covered" > if (!match) {</span>
|
|
149
149
|
<span class="cstat-no" title="statement not covered" > return 0;</span>
|
|
@@ -156,31 +156,31 @@ export default {
|
|
|
156
156
|
(parseInt(match[4], 10) / precision)
|
|
157
157
|
);
|
|
158
158
|
},
|
|
159
|
-
timestampToTime: <span class="fstat-no" title="function not covered" >
|
|
159
|
+
timestampToTime: <span class="fstat-no" title="function not covered" >function(</span>second, decimalMark) {
|
|
160
160
|
var hours = <span class="cstat-no" title="statement not covered" >~~(second / 3600);</span>
|
|
161
161
|
var min = <span class="cstat-no" title="statement not covered" >~~(second / 60) % 60;</span>
|
|
162
162
|
var sec = <span class="cstat-no" title="statement not covered" >second % 60;</span>
|
|
163
163
|
var fixedSec = <span class="cstat-no" title="statement not covered" >sec.toFixed(3).replace('.', decimalMark ? decimalMark : ',');</span>
|
|
164
164
|
<span class="cstat-no" title="statement not covered" > return (hours < 10 ? '0' + hours : hours) + ":" + (min < 10 ? '0' + min : min) + ':' + (sec < 10 ? '0' + fixedSec : fixedSec);</span>
|
|
165
165
|
},
|
|
166
|
-
timeDiff: <span class="fstat-no" title="function not covered" >
|
|
166
|
+
timeDiff: <span class="fstat-no" title="function not covered" >function(</span>time1, time2) {
|
|
167
167
|
<span class="cstat-no" title="statement not covered" > if (time1 === undefined || time2 === undefined) {</span>
|
|
168
168
|
<span class="cstat-no" title="statement not covered" > return 0;</span>
|
|
169
169
|
}
|
|
170
170
|
<span class="cstat-no" title="statement not covered" > return this.timestampDiff(this.timeToTimestamp(time1), this.timeToTimestamp(time2));</span>
|
|
171
171
|
},
|
|
172
|
-
timestampDiff: <span class="fstat-no" title="function not covered" >
|
|
172
|
+
timestampDiff: <span class="fstat-no" title="function not covered" >function(</span>time1, time2) {
|
|
173
173
|
<span class="cstat-no" title="statement not covered" > if (time1 === undefined || time2 === undefined || time1 === time2) {</span>
|
|
174
174
|
<span class="cstat-no" title="statement not covered" > return 0;</span>
|
|
175
175
|
}
|
|
176
176
|
var diff = <span class="cstat-no" title="statement not covered" >time2 - time1;</span>
|
|
177
177
|
<span class="cstat-no" title="statement not covered" > return Math.round(Math.max(-1, Math.min(1, diff)) * 10) / 10;</span>
|
|
178
178
|
},
|
|
179
|
-
startTime: <span class="fstat-no" title="function not covered" >
|
|
179
|
+
startTime: <span class="fstat-no" title="function not covered" >function(</span>line) {
|
|
180
180
|
var timestamp = <span class="cstat-no" title="statement not covered" >this.timeToTimestamp(line.startTime) + (line.inOffset || 0);</span>
|
|
181
181
|
<span class="cstat-no" title="statement not covered" > return this.timestampToTime(timestamp);</span>
|
|
182
182
|
},
|
|
183
|
-
stopTime: <span class="fstat-no" title="function not covered" >
|
|
183
|
+
stopTime: <span class="fstat-no" title="function not covered" >function(</span>line) {
|
|
184
184
|
var timestamp = <span class="cstat-no" title="statement not covered" >this.timeToTimestamp(line.stopTime) + (line.outOffset || 0);</span>
|
|
185
185
|
<span class="cstat-no" title="statement not covered" > return this.timestampToTime(timestamp);</span>
|
|
186
186
|
}
|
|
@@ -190,7 +190,7 @@ export default {
|
|
|
190
190
|
</div><!-- /wrapper -->
|
|
191
191
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
192
192
|
Code coverage
|
|
193
|
-
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Wed Nov 27 2019
|
|
193
|
+
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Wed Nov 27 2019 12:25:59 GMT-0600 (Central Standard Time)
|
|
194
194
|
</div>
|
|
195
195
|
</div>
|
|
196
196
|
<script src="prettify.js"></script>
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
</h1>
|
|
21
21
|
<div class='clearfix'>
|
|
22
22
|
<div class='fl pad1y space-right2'>
|
|
23
|
-
<span class="strong">
|
|
23
|
+
<span class="strong">0% </span>
|
|
24
24
|
<span class="quiet">Statements</span>
|
|
25
|
-
<span class='fraction'>
|
|
25
|
+
<span class='fraction'>0/11</span>
|
|
26
26
|
</div>
|
|
27
27
|
<div class='fl pad1y space-right2'>
|
|
28
28
|
<span class="strong">0% </span>
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
<span class='fraction'>0/3</span>
|
|
36
36
|
</div>
|
|
37
37
|
<div class='fl pad1y space-right2'>
|
|
38
|
-
<span class="strong">
|
|
38
|
+
<span class="strong">0% </span>
|
|
39
39
|
<span class="quiet">Lines</span>
|
|
40
|
-
<span class='fraction'>
|
|
40
|
+
<span class='fraction'>0/11</span>
|
|
41
41
|
</div>
|
|
42
42
|
</div>
|
|
43
43
|
</div>
|
|
@@ -84,9 +84,9 @@
|
|
|
84
84
|
39
|
|
85
85
|
40
|
|
86
86
|
41
|
|
87
|
-
42</td><td class="line-coverage quiet"><span class="cline-any cline-
|
|
87
|
+
42</td><td class="line-coverage quiet"><span class="cline-any cline-no"> </span>
|
|
88
88
|
<span class="cline-any cline-neutral"> </span>
|
|
89
|
-
<span class="cline-any cline-
|
|
89
|
+
<span class="cline-any cline-no"> </span>
|
|
90
90
|
<span class="cline-any cline-neutral"> </span>
|
|
91
91
|
<span class="cline-any cline-neutral"> </span>
|
|
92
92
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -120,14 +120,14 @@
|
|
|
120
120
|
<span class="cline-any cline-no"> </span>
|
|
121
121
|
<span class="cline-any cline-neutral"> </span>
|
|
122
122
|
<span class="cline-any cline-neutral"> </span>
|
|
123
|
-
<span class="cline-any cline-
|
|
123
|
+
<span class="cline-any cline-no"> </span>
|
|
124
124
|
<span class="cline-any cline-neutral"> </span>
|
|
125
125
|
<span class="cline-any cline-neutral"> </span>
|
|
126
126
|
<span class="cline-any cline-neutral"> </span>
|
|
127
127
|
<span class="cline-any cline-neutral"> </span>
|
|
128
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">const extname = require("path").extname
|
|
128
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">const extname = <span class="cstat-no" title="statement not covered" >require("path").extname;</span>
|
|
129
129
|
|
|
130
|
-
const TYPES = {
|
|
130
|
+
const TYPES = <span class="cstat-no" title="statement not covered" >{</span>
|
|
131
131
|
document: ["doc", "docx", "xls", "xlsx", "txt", "pdf", "ppt", "pptx"],
|
|
132
132
|
|
|
133
133
|
video: ["mov", "mp4", "m4v", "mpg", "mxf"],
|
|
@@ -139,7 +139,7 @@ const TYPES = {
|
|
|
139
139
|
zip: ["zip"]
|
|
140
140
|
};
|
|
141
141
|
|
|
142
|
-
function <span class="fstat-no" title="function not covered" >extensionType(
|
|
142
|
+
function <span class="fstat-no" title="function not covered" >extensionType(extension) {</span>
|
|
143
143
|
<span class="cstat-no" title="statement not covered" > for (var type in TYPES) {</span>
|
|
144
144
|
<span class="cstat-no" title="statement not covered" > if (TYPES[type].indexOf(extension) > -1) {</span>
|
|
145
145
|
<span class="cstat-no" title="statement not covered" > return type;</span>
|
|
@@ -147,11 +147,11 @@ function <span class="fstat-no" title="function not covered" >extensionType(</sp
|
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
function <span class="fstat-no" title="function not covered" >extension(
|
|
150
|
+
function <span class="fstat-no" title="function not covered" >extension(path) {</span>
|
|
151
151
|
<span class="cstat-no" title="statement not covered" > return extname(path.split("?")[0].toLowerCase()).substring(1);</span>
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
function <span class="fstat-no" title="function not covered" >mediaType(
|
|
154
|
+
function <span class="fstat-no" title="function not covered" >mediaType(path) {</span>
|
|
155
155
|
var type = <span class="cstat-no" title="statement not covered" >extensionType(extension(path));</span>
|
|
156
156
|
|
|
157
157
|
<span class="cstat-no" title="statement not covered" > if (type) {</span>
|
|
@@ -161,7 +161,7 @@ function <span class="fstat-no" title="function not covered" >mediaType(</span>p
|
|
|
161
161
|
<span class="cstat-no" title="statement not covered" > throw new Error(`Unknown extension '${extension}'`);</span>
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
module.exports = {
|
|
164
|
+
<span class="cstat-no" title="statement not covered" >module.exports = {</span>
|
|
165
165
|
extension,
|
|
166
166
|
extensionType,
|
|
167
167
|
mediaType
|
|
@@ -172,7 +172,7 @@ module.exports = {
|
|
|
172
172
|
</div><!-- /wrapper -->
|
|
173
173
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
174
174
|
Code coverage
|
|
175
|
-
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Wed Nov 27 2019
|
|
175
|
+
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Wed Nov 27 2019 12:25:59 GMT-0600 (Central Standard Time)
|
|
176
176
|
</div>
|
|
177
177
|
</div>
|
|
178
178
|
<script src="prettify.js"></script>
|