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 - npm Package Compare versions

Comparing version 4.0.2 to 5.0.0

index.mjs

20

package.json
{
"name": "file-set",
"version": "4.0.2",
"version": "5.0.0",
"author": "Lloyd Brookes",
"description": "Expands file paths and glob expressions, returning matched and unmatched files and directories",
"license": "MIT",
"repository": "https://github.com/75lb/file-set",
"main": "./index.mjs",
"exports": "./index.mjs",
"files": [
"index.js"
"index.mjs"
],
"engines": {
"node": ">=10"
"node": ">=14"
},
"scripts": {
"test": "test-runner test/*.js",
"docs": "jsdoc2md -t README.hbs index.js > README.md"
"test": "test-runner test/*.mjs"
},
"author": "Lloyd Brookes",
"devDependencies": {
"jsdoc-to-markdown": "^7.0.0",
"test-runner": "^0.8.13"
"test-runner": "^0.9.2"
},
"dependencies": {
"array-back": "^5.0.0",
"glob": "^7.1.6"
"array-back": "^6.0.1",
"glob": "^7.1.7"
}
}

@@ -17,4 +17,5 @@ [![view on npm](https://badgen.net/npm/v/file-set)](https://www.npmjs.org/package/file-set)

```js
const FileSet = require('file-set')
const fileSet = new FileSet([ '*', 'not/existing/*' ])
import FileSet from 'file-set'
const fileSet = new FileSet()
await fileSet.add([ '*', 'not/existing/*' ])
console.log(fileSet)

@@ -41,3 +42,3 @@ ```

* [FileSet](#exp_module_file-set--FileSet) ⏏
* [new FileSet(patternList)](#new_module_file-set--FileSet_new)
* [new FileSet()](#new_module_file-set--FileSet_new)
* [.files](#module_file-set--FileSet+files) : <code>Array.&lt;string&gt;</code>

@@ -54,8 +55,4 @@ * [.dirs](#module_file-set--FileSet+dirs) : <code>Array.&lt;string&gt;</code>

#### new FileSet(patternList)
#### new FileSet()
| Param | Type | Description |
| --- | --- | --- |
| patternList | <code>string</code> \| <code>Array.&lt;string&gt;</code> | One or more file paths or glob expressions to inspect. |
<a name="module_file-set--FileSet+files"></a>

@@ -70,3 +67,3 @@

#### fileSet.dirs : <code>Array.&lt;string&gt;</code>
The existing directories found
The existing directories found. Directory paths will always end with `'/'`.

@@ -82,3 +79,3 @@ **Kind**: instance property of [<code>FileSet</code>](#exp_module_file-set--FileSet)

#### fileSet.add(files)
#### fileSet.add(patterns)
Add file patterns to the set.

@@ -90,3 +87,3 @@

| --- | --- | --- |
| files | <code>string</code> \| <code>Array.&lt;string&gt;</code> | One or more file paths or glob expressions to inspect. |
| patterns | <code>string</code> \| <code>Array.&lt;string&gt;</code> | One or more file paths or glob expressions to inspect. |

@@ -98,2 +95,2 @@

Tested by [test-runner](https://github.com/test-runner-js/test-runner). Documented by [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown).
Tested by [test-runner](https://github.com/test-runner-js/test-runner).
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