You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would be more idiomatic JS in terms of convention (e.g. privates) and
of course reduces the pollution vector down to one property.
Obviously this will be API breaking but hopefully it's early enough for you to do that.
If for whatever reason you need to keep the API and maybe relegate namespacing
everything under vs.* till a later version, you could mitigate some of the problems
of property pollution by hijacking the prototype chain - see my fork here
This way, if there are any (..fairly unlikely but you can never be sure) clashes between your
property and a users property then the users property win instead of vstreams which I believe
is inline with your design philosophy on this.
The text was updated successfully, but these errors were encountered:
Hey man love what you're doing here, just a couple of ideas for you
Instead of adding multiple properties namespaces vs* and vs_* how about you
just add a vs object,
so, for instance in the instrumentObject function you would do
This would be more idiomatic JS in terms of convention (e.g. privates) and
of course reduces the pollution vector down to one property.
Obviously this will be API breaking but hopefully it's early enough for you to do that.
If for whatever reason you need to keep the API and maybe relegate namespacing
everything under vs.* till a later version, you could mitigate some of the problems
of property pollution by hijacking the prototype chain - see my fork here
https://github.com/davidmarkclements/node-vstream/blob/master/lib/vstream.js#L75-L90
for how to do that.
This way, if there are any (..fairly unlikely but you can never be sure) clashes between your
property and a users property then the users property win instead of vstreams which I believe
is inline with your design philosophy on this.
The text was updated successfully, but these errors were encountered: