Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

watch-drive

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

watch-drive

Watch a Hyperdrive or a Localdrive and get the diff

Source
npmnpm
Version
2.0.1
Version published
Weekly downloads
312
54.46%
Maintainers
1
Weekly downloads
 
Created
Source

watch-drive

Watch a Hyperdrive or a Localdrive and get the diff

npm install watch-drive

Usage

const watch = require('watch-drive')

// returns a readable stream
const w = watch(drive, prefix)

for await (const diff of w) {
  for (const { type, key } of diff) {
    // type is either 'update' or 'delete'
    // key is the key that changed
    console.log(type, key)
  }
}

License

Apache-2.0

FAQs

Package last updated on 27 Mar 2024

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