Skip to content

Commit 0f4d927

Browse files
authored
rewrite to arrow functions
1 parent d9daaea commit 0f4d927

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

lib/node/NodeWatchFileSystem.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class NodeWatchFileSystem {
3636
if(callbackUndelayed)
3737
this.watcher.once("change", callbackUndelayed);
3838

39-
this.watcher.once("aggregated", function(changes) {
39+
this.watcher.once("aggregated", (changes) => {
4040
if(this.inputFileSystem && this.inputFileSystem.purge) {
4141
this.inputFileSystem.purge(changes);
4242
}
@@ -45,20 +45,20 @@ class NodeWatchFileSystem {
4545
changes.filter(file => files.indexOf(file) >= 0).sort(),
4646
changes.filter(file => dirs.indexOf(file) >= 0).sort(),
4747
changes.filter(file => missing.indexOf(file) >= 0).sort(), times, times);
48-
}.bind(this));
48+
});
4949

5050
this.watcher.watch(files.concat(missing), dirs, startTime);
5151

5252
if(oldWatcher) {
5353
oldWatcher.close();
5454
}
5555
return {
56-
close: function() {
56+
close: () => {
5757
this.watcher.close();
58-
}.bind(this),
59-
pause: function() {
58+
},
59+
pause: () => {
6060
this.watcher.pause();
61-
}.bind(this)
61+
}
6262
};
6363
}
6464
}

0 commit comments

Comments
 (0)