Socket
Socket
Sign inDemoInstall

sane

Package Overview
Dependencies
6
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    sane

Sane aims to be fast, small, and reliable file system watcher. No bells and whistles, just change events.


Version published
Maintainers
1
Install size
129 kB
Created

Readme

Source

sane

I've been driven to insanity by node filesystem watcher wrappers. Sane aims to be fast, small, and reliable file system watcher. No bells and whistles, just change events.

API

sane(dir, globs)

Shortcut for new sane.Watcher(files, {globs: globs})

var watcher = sane('path/to/dir', ['**/*.js, '**/*.css']);
watcher.on('ready', function () { console.log('ready') });
watcher.on('change', function (filepath) { console.log('file changed', filepath); });
// close
watcer.close();

sane.Watcher(dir, options)

options:

  • persistent: boolean indicating that the process shouldn't die while we're watching files.
  • glob: a single string glob pattern or an array of them.

For the glob pattern documentation, see minimatch.

sane.Watcher#close

Stops watching.

License

MIT

Keywords

FAQs

Last updated on 25 Feb 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc