1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

Move IsLittleEndianCached and IsEvalSupportedCached to src/shared/util.js

Rather than duplicating the lookup and caching in multiple files, it seems easier to simply move all of this functionality into `src/shared/util.js` instead.
This will also help avoid a bunch of ESLint errors once the `no-shadow` rule is eventually enabled.
This commit is contained in:
Jonas Jenwald 2020-02-10 09:38:33 +01:00
parent 6db8e085ee
commit e4758beaaa
4 changed files with 16 additions and 26 deletions

View file

@ -17,19 +17,12 @@ import {
FormatError,
info,
isBool,
isEvalSupported,
shadow,
IsEvalSupportedCached,
unreachable,
} from "../shared/util.js";
import { isDict, isStream } from "./primitives.js";
import { PostScriptLexer, PostScriptParser } from "./ps_parser.js";
const IsEvalSupportedCached = {
get value() {
return shadow(this, "value", isEvalSupported());
},
};
class PDFFunctionFactory {
constructor({ xref, isEvalSupported = true }) {
this.xref = xref;