New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

simple-watcher

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-watcher - npm Package Compare versions

Comparing version 4.0.1 to 4.0.2

4

index.js

@@ -54,3 +54,3 @@ 'use strict'

options.ledger.add(dir)
watchDir(dir, { shallow: true }, (entityPath) => {
watchDir(dir, { shallow: true, tolerance: options.tolerance }, (entityPath) => {
fs.stat(entityPath, (err, stat) => {

@@ -79,3 +79,3 @@ if (err) { // Entity was deleted.

const callback = arg2 || arg1
const options = arg2 ? arg1 : { toleance: TOLERANCE }
const options = arg2 ? arg1 : { tolerance: TOLERANCE }
options.tolerance = process.platform === 'win32' ? (options.tolerance || TOLERANCE) : 0 // Disable tolerance if not on Windows.

@@ -82,0 +82,0 @@ options.fallback = options.fallback || !PLATFORMS.includes(process.platform)

{
"name": "simple-watcher",
"version": "4.0.1",
"version": "4.0.2",
"description": "\"A simple directory watcher.\"",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -29,3 +29,3 @@ # Simple Watcher

// No frills deep watching over a directory.
// Watch over file or directory:
watch('/path/to/foo', filePath => {

@@ -35,6 +35,11 @@ console.log(`Changed: ${filePath}`)

// Shallow watching over multiple directories.
watch(['/path/to/foo', '/path/to/bar'], {shallow: true}, filePath => {
// Watch over multiple paths:
watch(['/path/to/foo', '/path/to/bar'], filePath => {
console.log(`Changed: ${filePath}`)
})
// Shallow watch:
watch(['/path/to/foo', '/path/to/bar'], { shallow: true }, filePath => {
console.log(`Changed: ${filePath}`)
})
```

@@ -41,0 +46,0 @@

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