-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.js
More file actions
23 lines (16 loc) · 593 Bytes
/
Copy pathindex.js
File metadata and controls
23 lines (16 loc) · 593 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
const fkill = require('fkill');
const { ProcessName, ProcessNameConstants } = require('process-name');
const chrome = async (force) => {
const { BROWSERS: { CHROME } } = ProcessNameConstants;
const procName = ProcessName.BROWSERS[CHROME][process.platform];
return await fkill(procName, { force: force || true });
};
const firefox = async (force) => {
const { BROWSERS: { FIREFOX } } = ProcessNameConstants;
const procName = ProcessName.BROWSERS[FIREFOX][process.platform];
return await fkill(procName, { force: force || true });
};
module.exports = {
chrome,
firefox
};