nukor

Creates and focuses a high-frequency field of microwaves, literally cooking the target from within.

Usage no npm install needed!

<script type="module">
  import nukor from 'https://cdn.skypack.dev/nukor';
</script>

README

Nukor

Creates and focuses a high-frequency field of microwaves, literally cooking the target from within.

Nukor is a simple file watcher built on the top of @atom/watcher with a filtering module which removes duplicated events.

Table of Contents

Installation

npm install nukor --save

Usage

Create a watcher, start and listen changes by calling watchPath()

const { watchPath } = require('nukor');

// Create a new watcher, start and listen changes
const watcher = await watchPath('/path/to/watch', {}, events => {
  // ...
});

// Stop the watcher
watcher.stop();

Create a watcher by calling createWatcher()

const { Watcher } = require('nukor');

// Create a new watcher
const watcher = createWatcher('/path/to/watch');

// Listen to change events
watcher.on('change', events => {
  // ...
});

// Start the watcher
await watcher.start();

// Stop the watcher
watcher.stop();

Create a watcher by instantiating a Watcher class

const { Watcher } = require('nukor');

// Create a new watcher
const watcher = new Watcher('/path/to/watch');

// Listen to change events
watcher.on('change', events => {
  // ...
});

// Start the watcher
await watcher.start();

// Stop the watcher
watcher.stop();

Author

Alexandre Breteau - @0xSeldszar

License

MIT © Alexandre Breteau