Hacker News new | ask | show | jobs
by bzxcvbn 1399 days ago
Your problem would be solved pretty easily by making two changes to your API:

* Only accept an array of strings. Not a single string, not several strings, not several arrays of strings, and certainly not a space/comma-separated list of classes.

* Add another single overload where you accept a function that takes two parameters. That function can ignore its parameters if it wants to, and it returns a list of strings, so you don't need to accept several.

You have the same functionality, it's not harder to use for an end-user, and it's infinitely simpler to type.