mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
Remove the isString
helper function
The call-sites are replaced by direct `typeof`-checks instead, which removes unnecessary function calls. Note that in the `src/`-folder we already had more `typeof`-cases than `isString`-calls.
This commit is contained in:
parent
6bd4e0f5af
commit
99cd24ce3e
9 changed files with 47 additions and 75 deletions
|
@ -1030,10 +1030,6 @@ function utf8StringToString(str) {
|
|||
return unescape(encodeURIComponent(str));
|
||||
}
|
||||
|
||||
function isString(v) {
|
||||
return typeof v === "string";
|
||||
}
|
||||
|
||||
function isArrayBuffer(v) {
|
||||
return typeof v === "object" && v !== null && v.byteLength !== undefined;
|
||||
}
|
||||
|
@ -1138,7 +1134,6 @@ export {
|
|||
IsEvalSupportedCached,
|
||||
IsLittleEndianCached,
|
||||
isSameOrigin,
|
||||
isString,
|
||||
MissingPDFException,
|
||||
objectFromMap,
|
||||
objectSize,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue