mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Use shorter arrow functions where possible
For arrow functions that are both simple and short, we can avoid using explicit `return` to shorten them even further without hurting readability. For the `gulp mozcentral` build-target this reduces the overall size of the output by just under 1 kilo-byte (which isn't a lot but still can't hurt).
This commit is contained in:
parent
6e46304357
commit
9dfe9c552c
22 changed files with 78 additions and 169 deletions
|
@ -691,9 +691,9 @@ async function createBuiltInCMap(name, fetchBuiltInCMap) {
|
|||
const cMap = new CMap(true);
|
||||
|
||||
if (compressionType === CMapCompressionType.BINARY) {
|
||||
return new BinaryCMapReader().process(cMapData, cMap, useCMap => {
|
||||
return extendCMap(cMap, fetchBuiltInCMap, useCMap);
|
||||
});
|
||||
return new BinaryCMapReader().process(cMapData, cMap, useCMap =>
|
||||
extendCMap(cMap, fetchBuiltInCMap, useCMap)
|
||||
);
|
||||
}
|
||||
if (compressionType === CMapCompressionType.NONE) {
|
||||
const lexer = new Lexer(new Stream(cMapData));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue