🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

nsfw

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nsfw - npm Package Compare versions

Comparing version

to
1.2.9

15

js/src/index.js
const { promises: fs } = require('fs');
const path = require('path');
const { promisify } = require('util');
const NSFW = require('../../build/Release/nsfw.node');
const { NSFW } = require('../../build/Release/nsfw.node');

@@ -74,3 +75,3 @@ function NSFWFilePoller(watchPath, eventCallback, debounceMS) {

if (stats.isDirectory()) {
return new NSFW(watchPath, eventCallback, { debounceMS, errorCallback });
return new NSFW(debounceMS, watchPath, eventCallback, errorCallback);
} else if (stats.isFile()) {

@@ -89,5 +90,9 @@ return new NSFWFilePoller(watchPath, eventCallback, debounceMS);

const implementation = watchPath;
this.start = () => implementation.start();
this.stop = () => implementation.stop();
if (implementation instanceof NSFW) {
this.start = promisify((callback) => implementation.start(callback));
this.stop = promisify((callback) => implementation.stop(callback));
} else {
this.start = () => implementation.start();
this.stop = () => implementation.stop();
}
}

@@ -94,0 +99,0 @@

{
"name": "nsfw",
"version": "1.2.8",
"version": "1.2.9",
"description": "A simple file watcher for Node",

@@ -29,3 +29,3 @@ "main": "js/src/index.js",

"dependencies": {
"node-addon-api": "*"
"nan": "^2.0.0"
},

@@ -32,0 +32,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet