Skip to content

Commit 6309543

Browse files
committed
Apply code formatting
1 parent 852f985 commit 6309543

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

lib/application.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class Application extends events.EventEmitter {
9999
try {
100100
const code = await fsp.readFile(fileName, 'utf8');
101101
if (!code) return null;
102-
const src = '\'use strict\';\ncontext => ' + code;
102+
const src = `'use strict';\n(context) => ${code}`;
103103
const options = { filename: fileName, lineOffset: -1 };
104104
const script = new vm.Script(src, options);
105105
return script.runInContext(this.sandbox, SCRIPT_OPTIONS);

lib/channel.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ const HEADERS = {
2020
'Access-Control-Allow-Methods': 'POST, GET, OPTIONS',
2121
'Access-Control-Allow-Headers': 'Content-Type',
2222
'Content-Security-Policy': [
23-
'default-src \'self\' ws:',
24-
'style-src \'self\' https://fonts.googleapis.com',
25-
'font-src \'self\' https://fonts.gstatic.com',
23+
"default-src 'self' ws:",
24+
"style-src 'self' https://fonts.googleapis.com",
25+
"font-src 'self' https://fonts.gstatic.com",
2626
].join('; '),
2727
};
2828

lib/security.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const deserializeHash = (phcString) => {
2222
const kv = p.split('=');
2323
kv[1] = Number(kv[1]);
2424
return kv;
25-
})
25+
}),
2626
);
2727
const salt = Buffer.from(parsed[2], 'base64');
2828
const hash = Buffer.from(parsed[3], 'base64');
@@ -77,7 +77,7 @@ const validatePassword = (password, hash = defaultHash) =>
7777
return;
7878
}
7979
resolve(crypto.timingSafeEqual(hashedPassword, parsedHash.hash));
80-
}
80+
},
8181
);
8282
});
8383

0 commit comments

Comments
 (0)