I'm learning node.js, one of my node modules (irc-colors) will keep returning this error every time I run npm start
missing ) after argument list", source: D:\Documents\Twitch-Chat-Bot-master\node
_modules\irc-colors\lib\irc-colors.js (44)
Code in question
// Style functions.
Object.keys(styles).forEach((style) => {
var code = styles[style];
exports[style] = str => code + str + code;
});
It will work if I change it to
// Style functions.
Object.keys(styles).forEach(function(style) {
...
});
Now I don't think the way they've done the callback is a mistake since it's done like this multiple places, I think maybe this project is using the wrong version of JS? I'm unsure, I've never syntax like this before.
Someone please educate me, thank you