Socket
Socket
Sign inDemoInstall

fsevents

Package Overview
Dependencies
0
Maintainers
2
Versions
67
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.3.2 to 2.3.3

1

fsevents.js

@@ -53,2 +53,3 @@ /*

if (events.ItemIsDir & flags) return "directory";
if (events.MustScanSubDirs & flags) return "directory";
if (events.ItemIsSymlink & flags) return "symlink";

@@ -55,0 +56,0 @@ }

4

package.json
{
"name": "fsevents",
"version": "2.3.2",
"version": "2.3.3",
"description": "Native Access to MacOS FSEvents",

@@ -60,4 +60,4 @@ "main": "fsevents.js",

"devDependencies": {
"node-gyp": "^6.1.0"
"node-gyp": "^9.4.0"
}
}

@@ -1,2 +0,2 @@

# fsevents [![NPM](https://nodei.co/npm/fsevents.png)](https://nodei.co/npm/fsevents/)
# fsevents

@@ -12,6 +12,4 @@ Native access to MacOS FSEvents in [Node.js](https://nodejs.org/)

## Installation
## Usage
Supports only **Node.js v8.16 and higher**.
```sh

@@ -21,12 +19,20 @@ npm install fsevents

## Usage
Supports only **Node.js v8.16 and higher**.
```js
const fsevents = require('fsevents');
// To start observation
const stop = fsevents.watch(__dirname, (path, flags, id) => {
const info = fsevents.getInfo(path, flags, id);
}); // To start observation
stop(); // To end observation
const info = fsevents.getInfo(path, flags);
});
// To end observation
stop();
```
> **Important note:** The API behaviour is slightly different from typical JS APIs. The `stop` function **must** be
> retrieved and stored somewhere, even if you don't plan to stop the watcher. If you forget it, the garbage collector
> will eventually kick in, the watcher will be unregistered, and your callbacks won't be called anymore.
The callback passed as the second parameter to `.watch` get's called whenever the operating system detects a

@@ -33,0 +39,0 @@ a change in the file system. It takes three arguments:

Sorry, the diff of this file is not supported yet

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