itaylor / redux-socket.io

An opinionated connector between socket.io and redux
410 stars 53 forks source link

Match array type parsing behavior with a strings #4

Closed 1egoman closed 8 years ago

1egoman commented 8 years ago

If one passes a prefix as a string, then the library matches correctly, (ie, server/ against server/ACTION). In an array, this wasn't the case before - this change fixes that (so, ["server/", "ANOTHER_ACTION"] will match against server/ACTION and server/SOMETHING_ELSE and ANOTHER_ACTION).

I'm pretty sure you this was unintended when you wrote the library, and in my use of it this was a glaring issue.

Let me know if I missed something or misinterpreted toe code or its respective test. All tests still pass.

1egoman commented 8 years ago

Any feedback?

itaylor commented 8 years ago

Yeah, this looks good, I'd not needed this use-case, but I think it seems like it could be useful to others as well. Sorry about the delay on this notification, Inbox for Gmail has been burying my Github notifications in the "Low priority" folder :-1: