You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

file-set

Package Overview
Dependencies
Maintainers
1
Versions
37
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.

prev
Source
npmnpm
Version
1.1.2
Version published
Weekly downloads
360K
-6.68%
Maintainers
1
Weekly downloads
 
Created
Source

view on npm npm module downloads Build Status Dependency Status js-standard-style

file-set

Exports a contructor taking a list of file patterns as input, returning a file-set instance containing the expanded patterns split into separate lists of files, dirs and notExisting.

Example

const FileSet = require('file-set')

Install

$ npm install file-set --save

Usage

> const FileSet = require('file-set');

> new FileSet([ '*', 'not/existing/*' ])
FileSet {
  files: [ 'LICENSE', 'package.json', 'README.md' ],
  dirs: [ 'jsdoc2md/', 'lib/', 'node_modules/', 'test/' ],
  notExisting: [ 'not/existing/*' ] }

API

Exports a contructor taking a list of file patterns as input, returning a file-set instance containing the expanded patterns split into separate lists of files, dirs and notExisting.

Example

const FileSet = require('file-set')

FileSet ⏏

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

Kind: Exported class

new FileSet(patternList)

ParamTypeDescription
patternListstring | Array.<string>A pattern, or array of patterns to expand

fileSet.files : Array.<string>

The existing files found

Kind: instance property of FileSet

fileSet.dirs : Array.<string>

The existing directories found

Kind: instance property of FileSet

fileSet.notExisting : Array.<string>

Paths which were not found

Kind: instance property of FileSet

fileSet.add(files)

add file patterns to the set

Kind: instance method of FileSet

ParamTypeDescription
filesstring | Array.<string>A pattern, or array of patterns to expand

© 2014-16 Lloyd Brookes <75pound@gmail.com>. Documented by jsdoc-to-markdown.

FAQs

Package last updated on 24 Sep 2018

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