mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-23 12:39:59 +01:00
18 lines
389 B
TypeScript
18 lines
389 B
TypeScript
import * as nopt from 'nopt';
|
|
|
|
export default (vector, index) => {
|
|
const parsed = nopt({
|
|
'only-processor': Boolean,
|
|
'only-server': Boolean
|
|
}, {
|
|
p: ['--only-processor'],
|
|
s: ['--only-server']
|
|
}, vector, index);
|
|
|
|
if (parsed['only-processor'] && parsed['only-server']) {
|
|
throw 'only-processor option and only-server option cannot be set at the same time';
|
|
}
|
|
|
|
return parsed;
|
|
};
|