Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

file-set

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

file-set

Expands file patterns, returning the matched and unmatched files and directories.

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
207K
decreased by-12.48%
Maintainers
1
Weekly downloads
 
Created

What is file-set?

The file-set npm package allows you to easily include and exclude files using glob patterns. It is useful for tasks such as file manipulation, filtering, and organizing files based on specific patterns.

What are file-set's main functionalities?

Include Files

This feature allows you to include files that match a specific glob pattern. In this example, all JavaScript files in the 'src' directory and its subdirectories are included.

const fileSet = require('file-set');
fileSet('src/**/*.js', function(err, files) {
  if (err) throw err;
  console.log(files);
});

Exclude Files

This feature allows you to exclude files that match a specific glob pattern. In this example, all JavaScript files in the 'src' directory and its subdirectories are included, except for files named 'test.js'.

const fileSet = require('file-set');
fileSet(['src/**/*.js', '!src/**/test.js'], function(err, files) {
  if (err) throw err;
  console.log(files);
});

Multiple Patterns

This feature allows you to include files from multiple patterns. In this example, all JavaScript files in both the 'src' and 'lib' directories and their subdirectories are included.

const fileSet = require('file-set');
fileSet(['src/**/*.js', 'lib/**/*.js'], function(err, files) {
  if (err) throw err;
  console.log(files);
});

Other packages similar to file-set

FAQs

Package last updated on 09 Jun 2014

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc