iriscouch / follow

Very stable, very reliable, NodeJS CouchDB _changes follower
Apache License 2.0
393 stars 82 forks source link

Prevent options from overriding instance methods #58

Closed josip closed 9 years ago

josip commented 9 years ago

If you have something like:

new follow.Feed({follow: false})

as cradle has, then your Feed instance will be bonkers (#follow will be false).

This PR adds a simple check that makes sure that options can't override instance's functions. A better solution would be perhaps to have a white-list of options that Feed accepts or just keep options as-is in #options instead of augmenting the instance itself.

jcrugzz commented 9 years ago

Thanks!