Socket
Socket
Sign inDemoInstall

@pushrocks/smartchok

Package Overview
Dependencies
57
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @pushrocks/smartchok

smart wrapper for chokidar


Version published
Weekly downloads
14
increased by7.69%
Maintainers
1
Install size
6.40 MB
Created
Weekly downloads
 

Readme

Source

@pushrocks/smartchok

smart wrapper for chokidar

  • npmjs.org (npm package)
  • gitlab.com (source)
  • github.com (source mirror)
  • docs (typedoc)

Status for master

build status coverage report npm downloads per month Known Vulnerabilities TypeScript node JavaScript Style Guide

Usage

Use TypeScript for best in class instellisense.

import { Smartchok } from 'smartchok';

const mySmartChok = new Smartchok(['some/path/**/*.any', '/absolute/*.js'], chokidarOptions);

mySmartChok.add(['/some/**/*.any']); // add files

mySmartChok.remove('some/**/*.js');

mySmartChok.start(); // starts the watch process

mySmartChok.getObservableFor('change').then(observableArg => {
  observableArg.subscribe(x => {
    // do something here when a change is detected
    // possible events are 'add' | 'addDir' | 'change' | 'error' | 'unlink' | 'unlinkDir' | 'ready' | 'raw'
    // note that the observable is only created once you call .start() on the Smartchok instance
    // hence the promise construction
  });
});

mySmartChok.stop();

For further information read the linked docs at the top of this readme.

MIT licensed | © Lossless GmbH | By using this npm module you agree to our privacy policy

repo-footer

FAQs

Last updated on 29 Sep 2019

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