compiler-discord/src/languages/javascript.js

24 lines
515 B
JavaScript
Raw Normal View History

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