You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
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
2.1.0

18

index.d.ts

@@ -16,2 +16,6 @@ declare module 'nsfw' {

export interface NSFW {
/** Returns a Promise that resolves after NSFW has paused listening to events. */
pause: () => Promise<void>;
/** Returns a Promise that resolves after NSFW has resumed listening to events. */
resume: () => Promise<void>;
/** Returns a Promise that resolves when the NSFW object has started watching the path. */

@@ -30,10 +34,12 @@ start: () => Promise<void>;

type CreatedFileEvent = GenericFileEvent<ActionType.CREATED>;
type DeletedFileEvent = GenericFileEvent<ActionType.DELETED>;
type ModifiedFileEvent = GenericFileEvent<ActionType.MODIFIED>;
type FileChangeEvent = CreatedFileEvent | DeletedFileEvent | ModifiedFileEvent | RenamedFileEvent;
export type CreatedFileEvent = GenericFileEvent<ActionType.CREATED>;
export type DeletedFileEvent = GenericFileEvent<ActionType.DELETED>;
export type ModifiedFileEvent = GenericFileEvent<ActionType.MODIFIED>;
export type FileChangeEvent = CreatedFileEvent | DeletedFileEvent | ModifiedFileEvent | RenamedFileEvent;
interface RenamedFileEvent {
export interface RenamedFileEvent {
/** the type of event that occurred */
action: ActionType.RENAMED;
/** the directory before a rename */
directory: string;
/** the name of the file before a rename*/

@@ -47,3 +53,3 @@ oldFile: string;

interface GenericFileEvent<T extends ActionType> {
export interface GenericFileEvent<T extends ActionType> {
/** the type of event that occurred */

@@ -50,0 +56,0 @@ action: T;

@@ -48,2 +48,5 @@ const { promises: fs } = require('fs');

};
this.pause = () => this.stop();
this.resume = () => this.start();
}

@@ -92,2 +95,4 @@

this.stop = () => implementation.stop();
this.pause = () => implementation.pause();
this.resume = () => implementation.resume();
}

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

{
"name": "nsfw",
"version": "2.0.0",
"version": "2.1.0",
"description": "A simple file watcher for Node",

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

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

Sorry, the diff of this file is not supported yet