2019-03-12 10:09:46 +01:00
|
|
|
const Language = require('../struct/Language');
|
|
|
|
|
|
|
|
class JavaScript extends Language {
|
|
|
|
constructor() {
|
|
|
|
super('javaScript', {
|
|
|
|
highlight: 'js',
|
|
|
|
aliases: ['javaScript', 'js'],
|
|
|
|
options: {
|
2019-03-13 06:08:03 +01:00
|
|
|
harmony: () => ''
|
2019-03-12 10:09:46 +01:00
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
runWith(options) {
|
|
|
|
if (options.has('harmony')) {
|
|
|
|
return { id: this.id, env: { EVAL_HARMONY: 'true' } };
|
|
|
|
}
|
|
|
|
|
|
|
|
return { id: this.id, env: {} };
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = JavaScript;
|