broccolijs / broccoli-funnel

MIT License
66 stars 37 forks source link

Don’t mutate any filter arrays passed in. #14

Closed timmfin closed 9 years ago

timmfin commented 9 years ago

They might be external variables used by other code. This tripped me up for a little while, because I was re-using a filter array variable in other code and it was unexpectedly not an array of strings anymore (it was mutated into an array of objects).

joliss commented 9 years ago

Sounds very reasonable, and the code looks good to me. :+1:

We can perhaps tighten up the whole option handling code a bit by explicitly enumerating options, but there's no reason not to merge this PR in the meantime.