Skip to content

Commit 392a7a9

Browse files
committed
Improved coverage
1 parent 38b98a6 commit 392a7a9

23 files changed

+81
-324
lines changed

compiled/download.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

compiled/upload-download.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

compiled/upload.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
* - [[OptionalType]]
6363
* - [[PointerType]]
6464
*/
65+
/*istanbul ignore next*/ //for TypeScript's auto-generated code
6566
function __export(m) {
6667
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
6768
}

dist/lib/assert.js

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,17 @@ const util_inspect_1 = require("./util-inspect");
1212
function instanceOf(instance, constructors) {
1313
if (!(constructors instanceof Array))
1414
constructors = [constructors];
15-
let constructorMatched = false;
1615
for (const constructor of constructors) {
1716
if (instance instanceof constructor ||
1817
(!(instance === undefined || instance === null) && instance.constructor === constructor) //necessary for primitives
19-
) {
20-
constructorMatched = true;
18+
)
2119
return;
22-
}
23-
}
24-
if (!constructorMatched) {
25-
throw new TypeError(util_inspect_1.inspect(instance) +
26-
' is not an instance of ' +
27-
constructors
28-
.map(({ name }) => name)
29-
.join(' or '));
3020
}
21+
throw new TypeError(util_inspect_1.inspect(instance) +
22+
' is not an instance of ' +
23+
constructors
24+
.map(({ name }) => name)
25+
.join(' or '));
3126
}
3227
/**
3328
* Throws an error if the given value is not an integer

dist/lib/read-util.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export interface ReadResult<E> {
2020
* This allows a reference to the read value to be used
2121
* before the read value is populated.
2222
* @param readType The [[Type]] reading a value
23-
* @param count If an [[ArrayType]], can pass in a length
23+
* @param count If an [[ArrayType]], must pass in a length
2424
* to initialize the array value with
2525
* @return `[]`, `new Map`, `new Set`, or `{}`
2626
*/

dist/lib/read-util.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ exports.NOT_LONG_ENOUGH = 'Buffer is not long enough';
1717
* This allows a reference to the read value to be used
1818
* before the read value is populated.
1919
* @param readType The [[Type]] reading a value
20-
* @param count If an [[ArrayType]], can pass in a length
20+
* @param count If an [[ArrayType]], must pass in a length
2121
* to initialize the array value with
2222
* @return `[]`, `new Map`, `new Set`, or `{}`
2323
*/
2424
function makeBaseValue(readType, count) {
2525
switch (readType.constructor) {
26-
case array_1.default: return count === undefined ? [] : new Array(count);
26+
case array_1.default: return new Array(count);
2727
case tuple_1.default: return new Array(readType.length);
2828
case map_1.default: return new Map;
2929
case set_1.default: return new Set;

docs/assets/js/search.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/interfaces/_lib_util_inspect_.stringindexable.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ <h3 class="tsd-before-signature">Indexable</h3>
108108
<li class=" tsd-kind-function tsd-parent-kind-external-module tsd-is-external">
109109
<a href="../modules/_lib_util_inspect_.html#inspect" class="tsd-kind-icon">inspect</a>
110110
</li>
111+
<li class=" tsd-kind-function tsd-parent-kind-external-module tsd-is-external tsd-is-not-exported">
112+
<a href="../modules/_lib_util_inspect_.html#inspectwithseen" class="tsd-kind-icon">inspect<wbr>With<wbr>Seen</a>
113+
</li>
111114
<li class=" tsd-kind-function tsd-parent-kind-external-module tsd-is-external tsd-is-not-exported">
112115
<a href="../modules/_lib_util_inspect_.html#toobject" class="tsd-kind-icon">to<wbr>Object</a>
113116
</li>

docs/interfaces/_read_.noparamstype.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,6 @@ <h4 class="tsd-returns-title">Returns <a href="_types_type_.type.html" class="ts
139139
<li class=" tsd-kind-interface tsd-parent-kind-external-module tsd-is-not-exported">
140140
<a href="_read_.types.html" class="tsd-kind-icon">Types</a>
141141
</li>
142-
<li class=" tsd-kind-interface tsd-parent-kind-external-module tsd-has-type-parameter">
143-
<a href="_read_.valuereadparams.html" class="tsd-kind-icon">Value<wbr>Read<wbr>Params</a>
144-
</li>
145142
<li class=" tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported">
146143
<a href="../modules/_read_.html#recursive_name_length" class="tsd-kind-icon">RECURSIVE_<wbr>NAME_<wbr>LENGTH</a>
147144
</li>

0 commit comments

Comments
 (0)