Writing JS/PHP code in feature? Is it normal practice to write code (JS/PHP) in feature?

I was thinking that feature should contains ONLY settings, however I've read that some developers write code there and they believe it's fine.

the reason why I ask I found a video on drupalize where they write code in feature so I'm in doubt now.

Any pros and cons to that?
Yes there is no problem inserting code in a feature. I guess the con is that you do not need to introduce a new module.