Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

watch-dependency-graph

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

watch-dependency-graph

[![npm version](https://img.shields.io/npm/v/watch-dependency-graph?style=flat&colorA=4488FF&colorB=4488FF)](https://www.npmjs.com/package/watch-dependency-graph) [![test coverage](https://img.shields.io/coveralls/github/sure-thing/watch-dependency-graph?

  • 2.7.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
199
increased by2.58%
Maintainers
1
Weekly downloads
 
Created
Source

watch-dependency-graph

npm version test coverage npm bundle size

A small Node.js file watcher that watches dependency trees instead of globs or directories.

import { create } from 'watch-dependency-graph'

const files = [path.resolve(__dirname, './my-file.js')]

const watcher = create()

watcher.on('change', (files) => {}) // string[]
watcher.on('remove', (files) => {}) // string[]
watcher.on('error', (error) => {}) // string[]

watcher.add(files) // string or string[], must be absolute
watcher.remove(files) // string or string[], must be absolute

const removeListener = watcher.on('change', (files) => {})
removeListener()

License

MIT License © Sure Thing

Keywords

FAQs

Package last updated on 15 Nov 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc