paulmillr / chokidar

Minimal and efficient cross-platform file watching library

Home Page:https://paulmillr.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Features: multiple events options for `.on()`

sudoaugustin opened this issue · comments

Sometimes we want to apply the same functions for different events. So I think it would be great if the on method accept multiple events

chokidar.watch("some/paths").on('change, add', () => someFunc());

(or)

chokidar.watch("some/paths").on(["change", "add"], () => someFunc());

Use 'all' event, or do it manually with loop