28 lines
599 B
JavaScript
28 lines
599 B
JavaScript
const Language = require('../struct/Language');
|
|
|
|
class JavaScript extends Language {
|
|
constructor() {
|
|
super('javascript', {
|
|
aliases: ['javascript', 'js'],
|
|
options: {
|
|
harmony: () => '',
|
|
e: () => ''
|
|
}
|
|
});
|
|
}
|
|
|
|
runWith(options) {
|
|
const ret = { id: this.id, env: {} };
|
|
if (options.has('harmony')) {
|
|
ret.env.EVAL_HARMONY = 'true';
|
|
}
|
|
|
|
if (options.has('e')) {
|
|
ret.env.EVAL_EXPR = 'true';
|
|
}
|
|
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
module.exports = JavaScript;
|