mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Remove the isStream
helper function
At this point all the various Stream-classes extends an abstract base-class, hence this helper function is no longer necessary and only adds unnecessary indirection in the code.
This commit is contained in:
parent
d9a3a24353
commit
1a31855977
15 changed files with 51 additions and 80 deletions
|
@ -21,7 +21,6 @@ import {
|
|||
isName,
|
||||
isRef,
|
||||
isRefsEqual,
|
||||
isStream,
|
||||
Name,
|
||||
Ref,
|
||||
RefSet,
|
||||
|
@ -560,16 +559,4 @@ describe("primitives", function () {
|
|||
expect(isRefsEqual(ref1, ref2)).toEqual(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe("isStream", function () {
|
||||
it("handles non-streams", function () {
|
||||
const nonStream = {};
|
||||
expect(isStream(nonStream)).toEqual(false);
|
||||
});
|
||||
|
||||
it("handles streams", function () {
|
||||
const stream = new StringStream("foo");
|
||||
expect(isStream(stream)).toEqual(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue