Enforce single quotes
This commit is contained in:
@@ -16,20 +16,20 @@ const threads_1 = require("threads");
|
||||
function getRouter(fileToWatch, opts) {
|
||||
const features = new _1.WaitForSync();
|
||||
(() => __awaiter(this, void 0, void 0, function* () {
|
||||
const worker = yield threads_1.spawn(new threads_1.Worker("./polyfill-worker"));
|
||||
const worker = yield threads_1.spawn(new threads_1.Worker('./polyfill-worker'));
|
||||
const feats = yield worker(fileToWatch);
|
||||
yield threads_1.Thread.terminate(worker);
|
||||
return feats;
|
||||
}))()
|
||||
.then(feats => {
|
||||
feats["fetch"] = {};
|
||||
_1.Logger.debug("Polyfill analysed:", Object.keys(feats));
|
||||
feats['fetch'] = {};
|
||||
_1.Logger.debug('Polyfill analysed:', Object.keys(feats));
|
||||
features.setData(feats);
|
||||
})
|
||||
.catch(err => features.setError(err));
|
||||
const options = Object.assign({ minify: _1.DefaultConfig.isProduction, unknown: "polyfill" }, opts);
|
||||
const options = Object.assign({ minify: _1.DefaultConfig.isProduction, unknown: 'polyfill' }, opts);
|
||||
return (req, res) => __awaiter(this, void 0, void 0, function* () {
|
||||
const polyfillBundle = yield polyfillLibrary.getPolyfillString(Object.assign(Object.assign({}, options), { uaString: req.header("user-agent"), features: yield features.resolve(), stream: false }));
|
||||
const polyfillBundle = yield polyfillLibrary.getPolyfillString(Object.assign(Object.assign({}, options), { uaString: req.header('user-agent'), features: yield features.resolve(), stream: false }));
|
||||
res.setHeader('Content-Type', 'text/javascript');
|
||||
res.send(polyfillBundle);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user