mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +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
|
@ -19,13 +19,7 @@ import {
|
|||
BaseStandardFontDataFactory,
|
||||
BaseSVGFactory,
|
||||
} from "./base_factory.js";
|
||||
import {
|
||||
BaseException,
|
||||
isString,
|
||||
stringToBytes,
|
||||
Util,
|
||||
warn,
|
||||
} from "../shared/util.js";
|
||||
import { BaseException, stringToBytes, Util, warn } from "../shared/util.js";
|
||||
|
||||
const SVG_NS = "http://www.w3.org/2000/svg";
|
||||
|
||||
|
@ -482,7 +476,7 @@ class PDFDateString {
|
|||
* @returns {Date|null}
|
||||
*/
|
||||
static toDateObject(input) {
|
||||
if (!input || !isString(input)) {
|
||||
if (!input || typeof input !== "string") {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue