How to use the @cnakazawa/watch.createMonitor function in @cnakazawa/watch

To help you get started, we’ve selected a few @cnakazawa/watch examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github amasad / sane / test / plugin_watcher.js View on Github external
function PluginTestWatcher(dir, opts) {
  opts = common.assignOptions(this, opts);

  this.watched = Object.create(null);
  this.root = path.resolve(dir);

  watch.createMonitor(
    this.root,
    {
      interval: (opts.interval || DEFAULT_DELAY) / 1000,
      filter: this.filter.bind(this),
    },
    this.init.bind(this)
  );
}
github makuga01 / dnsFookup / FE / node_modules / sane / src / poll_watcher.js View on Github external
constructor(dir, opts) {
    super();

    opts = common.assignOptions(this, opts);

    this.watched = Object.create(null);
    this.root = path.resolve(dir);

    watch.createMonitor(
      this.root,
      {
        interval: (opts.interval || DEFAULT_DELAY) / 1000,
        filter: this.filter.bind(this),
      },
      this.init.bind(this)
    );
  }
github amasad / sane / src / poll_watcher.js View on Github external
constructor(dir, opts) {
    super();

    opts = common.assignOptions(this, opts);

    this.watched = Object.create(null);
    this.root = path.resolve(dir);

    watch.createMonitor(
      this.root,
      {
        interval: (opts.interval || DEFAULT_DELAY) / 1000,
        filter: this.filter.bind(this),
      },
      this.init.bind(this)
    );
  }

@cnakazawa/watch

Utilities for watching file trees.

Apache-2.0
Latest version published 5 years ago

Package Health Score

70 / 100
Full package analysis

Popular @cnakazawa/watch functions