Could reduce the amount of code a bit more by using the ES6 map and import construction
Tijmen van Gulik
21

for some reason this change that changes don’t work for me because of:

←- Last few GCs — ->
[17316:0000014FE38FCBE0] 30224 ms: Mark-sweep 1367.0 (1427.8) -> 1366.7 (1394.8) MB, 7330.3 / 0.0 ms last resort
[17316:0000014FE38FCBE0] 37318 ms: Mark-sweep 1366.7 (1394.8) -> 1366.7 (1394.8) MB, 7094.3 / 0.0 ms last resort
←- JS stacktrace — ->
==== JS stack trace =========================================
Security context: 000002E851EA9891 <JS Object>
 2: /* anonymous */ [D:\Projects\VS\Personal\ann\index.ts:~14] [pc=0000001C32567708](this=00000185B2B8D151 <a Jimp with map 0000007B3EE7AFF1>,x=779,y=1794,idx=26410796)
 3: scan [D:\Projects\VS\Personal\ann\node_modules\jimp\index.js:~662] [pc=0000001C32565CB7](this=00000185B2B8D151 <a Jimp with map 0000007B3EE7AFF1>,x=0,y=0,w=3680,h=2456,f=0000007F16278A61 <JS Function (SharedFunctionI…
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed — JavaScript heap out of memory
Responses
The author has chosen not to show responses on this story. You can still respond by clicking the response bubble.