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
feedparser.on('readable',function(){// This is where the action is!varstream=this;// `this` is `feedparser`, which is a stream
...
});
However, relying on non-standard ("magic") this binding breaks the declaration model of modern JS (we can't use arrow functions now, for example), not to mention being essentially unnecessary: we can just make it the callback argument:
This is an API update request.
Currently the README shows the following code:
However, relying on non-standard ("magic")
this
binding breaks the declaration model of modern JS (we can't use arrow functions now, for example), not to mention being essentially unnecessary: we can just make it the callback argument:Now we can use modern arrow functions too, without
this
rebinding breaking things:The text was updated successfully, but these errors were encountered: