mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 01:58:06 +02:00
Convert the files in the /src/core
folder to ES6 modules
Please note that the `glyphlist.js` and `unicode.js` files are converted to CommonJS modules instead, since Babel cannot handle files that large and they are thus excluded from transpilation.
This commit is contained in:
parent
b66b705ed7
commit
982b6aa65b
34 changed files with 3504 additions and 4203 deletions
|
@ -14,19 +14,7 @@
|
|||
*/
|
||||
/* uses XRef */
|
||||
|
||||
'use strict';
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('pdfjs/core/primitives', ['exports', 'pdfjs/shared/util'], factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports, require('../shared/util.js'));
|
||||
} else {
|
||||
factory((root.pdfjsCorePrimitives = {}), root.pdfjsSharedUtil);
|
||||
}
|
||||
}(this, function (exports, sharedUtil) {
|
||||
|
||||
var isArray = sharedUtil.isArray;
|
||||
import { isArray } from '../shared/util';
|
||||
|
||||
var EOF = {};
|
||||
|
||||
|
@ -299,18 +287,19 @@ function isStream(v) {
|
|||
return typeof v === 'object' && v !== null && v.getBytes !== undefined;
|
||||
}
|
||||
|
||||
exports.EOF = EOF;
|
||||
exports.Cmd = Cmd;
|
||||
exports.Dict = Dict;
|
||||
exports.Name = Name;
|
||||
exports.Ref = Ref;
|
||||
exports.RefSet = RefSet;
|
||||
exports.RefSetCache = RefSetCache;
|
||||
exports.isEOF = isEOF;
|
||||
exports.isCmd = isCmd;
|
||||
exports.isDict = isDict;
|
||||
exports.isName = isName;
|
||||
exports.isRef = isRef;
|
||||
exports.isRefsEqual = isRefsEqual;
|
||||
exports.isStream = isStream;
|
||||
}));
|
||||
export {
|
||||
EOF,
|
||||
Cmd,
|
||||
Dict,
|
||||
Name,
|
||||
Ref,
|
||||
RefSet,
|
||||
RefSetCache,
|
||||
isEOF,
|
||||
isCmd,
|
||||
isDict,
|
||||
isName,
|
||||
isRef,
|
||||
isRefsEqual,
|
||||
isStream,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue