Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

poller

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

poller

A FileSystem poller for Node.js

latest
Source
npmnpm
Version
0.0.8
Version published
Weekly downloads
9
-77.5%
Maintainers
1
Weekly downloads
 
Created
Source

Poller

NPM version Node.js CI Test Coverage Maintainability Socket Badge

A FileSystem poller for Node.js.

Dependencies

  • Node.js (v22+)

Install

npm install poller

Usage

// Require the library
const poller = require('poller');

// Poll a file directory
poller('/tmp/myFolder', (err, poll) => {
	// Log every time a file is added into the folder
	poll.on('add', filePath => {
		console.log(filePath, 'was added');
	});

	// Log every time a file is removed from the folder
	poll.on('remove', filePath => {
		console.log(filePath, 'was removed');
	});

	// Stop polling the folder for file adds/removals
	poll.close();
});

// Poll a file directory at an interval of 50ms (the default is 100ms)
poller('/tmp/myFolder', { interval: 50 }, (err, poll) => {});

Licence and Rights

© 2025 Anephenix OÜ. Poller is licenced under the MIT license.

Keywords

fs

FAQs

Package last updated on 10 Jun 2025

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