🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

fs-synchronizer

Package Overview
Dependencies
Maintainers
4
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fs-synchronizer

Recursively find files in folder and extract file informations.

latest
Source
npmnpm
Version
0.2.1
Version published
Maintainers
4
Created
Source

fs-synchronizer

NPM version build status Test coverage npm download

Recursively find files in folder and extract file informations.

Installation

$ npm i fs-synchronizer

Usage

import { FileSynchronizer } from 'fs-synchronizer';
const sync = new FileSynchronizer({
  root: 'test-utils',
  maxDepth: 2,
  patterns: [{ type: 'include', pattern: 'a*' }],
});

sync.on('file', (fileInfo) => {
  console.log(`Found file: ${fileInfo.filename}`);
});
sync.on('excluded-file', (fileInfo) => {
  console.log(`Excluded file: ${fileInfo.filename}`);
});
sync.on('end', () => {
  console.log('Finished walking');
});
await sync.walk();

License

MIT

FAQs

Package last updated on 01 Jul 2021

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