Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmillr committed Mar 22, 2019
1 parent af3db1c commit 2f57d8c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ npm install chokidar
Then `require` and use it in your code:

```javascript
var chokidar = require('chokidar');
const chokidar = require('chokidar');

// One-liner for current directory, ignores .dotfiles
chokidar.watch('.', {ignored: /(^|[\/\\])\../}).on('all', (event, path) => {
Expand All @@ -73,13 +73,13 @@ chokidar.watch('.', {ignored: /(^|[\/\\])\../}).on('all', (event, path) => {
// Example of a more typical implementation structure:

// Initialize watcher.
var watcher = chokidar.watch('file, dir, glob, or array', {
const watcher = chokidar.watch('file, dir, glob, or array', {
ignored: /(^|[\/\\])\../,
persistent: true
});

// Something to use when events are received.
var log = console.log.bind(console);
const log = console.log.bind(console);
// Add event listeners.
watcher
.on('add', path => log(`File ${path} has been added`))
Expand Down

0 comments on commit 2f57d8c

Please sign in to comment.