Closed Marak closed 13 years ago
https://github.com/nodejitsu/kohai/blob/master/lib/plugins/alias.js#L30
This method needs to be refactored.
Insults should be stored as an array of strings in the config.json file. The code for sending insults should only be a few lines long.
The switch / case in this block of code has introduced an anti-pattern. You need to uncouple the data ( insults ) from the logic ( sending insults ).
https://github.com/nodejitsu/kohai/blob/master/lib/plugins/alias.js#L30
This method needs to be refactored.
Insults should be stored as an array of strings in the config.json file. The code for sending insults should only be a few lines long.
The switch / case in this block of code has introduced an anti-pattern. You need to uncouple the data ( insults ) from the logic ( sending insults ).