Minify: Move tar processing into a function

This reduces the overhead of `require()`ing the module, and it will
make it easier for a future commit to asyncify everything in
`Minify.js`.
This commit is contained in:
Richard Hansen 2021-02-09 17:11:44 -05:00 committed by John McLear
parent 8ae8710a14
commit 996dc81825
2 changed files with 17 additions and 17 deletions

View file

@ -26,8 +26,7 @@ exports.expressCreateServer = (hookName, args, cb) => {
});
const StaticAssociator = Yajsml.associators.StaticAssociator;
const associations =
Yajsml.associators.associationsForSimpleMapping(minify.tar);
const associations = Yajsml.associators.associationsForSimpleMapping(minify.getTar());
const associator = new StaticAssociator(associations);
jsServer.setAssociator(associator);