2019-03-12 10:09:46 +01:00
|
|
|
const Language = require('../struct/Language');
|
|
|
|
|
|
|
|
class JavaScript extends Language {
|
|
|
|
constructor() {
|
2019-03-13 06:32:27 +01:00
|
|
|
super('javascript', {
|
2019-03-12 10:09:46 +01:00
|
|
|
highlight: 'js',
|
2019-03-13 06:32:27 +01:00
|
|
|
aliases: ['javascript', 'js'],
|
2019-03-12 10:09:46 +01:00
|
|
|
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;
|