-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unwatch modification #15
Comments
That's nice, would like to see any modifications and improvements! |
I'm realizing it was already in my fork. There is no explicit mention of close in the source code but you can now say.
Here's a review of what it does. jvonmitchell@22e5936#diff-481962e7a473d9939d95e86648f023ee All it does is expose the underlying listener so that you can close it. If any one wants to build a better return object that's ok with me. The idea is that the call to watch was exposing nothing so we might as well make it something. One flaw with the way it is done is that it may return a listener or a [] so you have to watch for that. That's why there is a good argument for a better return object. PS, yuanchuan: I want to apologize for writing something that may seem out of context. Someone emailed me asking for the updated code. I thought those emails were sent to me from this issue. Hence the sillyness. Feel free to use the changes I made. |
Ok. I now have a branch that returns an instance of an internal class that we can define behaviors for our return object in. I implemented close. More things could be implemented. The branch is called returnObject. |
👍 |
Hi, on my system I'm doing a quick fix to allow for unwatching and figured you might be interested in what I'm doing. I'm just returning the fs.watch so the user can perform a close on that. We might as well have the function return something.
The text was updated successfully, but these errors were encountered: