Comparing version
/** | ||
* Breaks an input list of file paths and glob expressions into three categories: files, directories and not existing. | ||
* @module file-set | ||
* @example | ||
* ```js | ||
* const FileSet = require('file-set') | ||
* ``` | ||
*/ | ||
@@ -9,0 +4,0 @@ |
{ | ||
"name": "file-set", | ||
"version": "3.0.0", | ||
"version": "4.0.0", | ||
"description": "Expands file paths and glob expressions, returning matched and unmatched files and directories", | ||
@@ -11,3 +11,3 @@ "license": "MIT", | ||
"engines": { | ||
"node": ">=8" | ||
"node": ">=10" | ||
}, | ||
@@ -20,9 +20,9 @@ "scripts": { | ||
"devDependencies": { | ||
"jsdoc-to-markdown": "^5.0.2", | ||
"test-runner": "^0.6.0" | ||
"jsdoc-to-markdown": "^5.0.3", | ||
"test-runner": "^0.8.13" | ||
}, | ||
"dependencies": { | ||
"array-back": "^4.0.0", | ||
"glob": "^7.1.5" | ||
"array-back": "^4.0.1", | ||
"glob": "^7.1.6" | ||
} | ||
} |
@@ -1,3 +0,3 @@ | ||
[](https://www.npmjs.org/package/file-set) | ||
[](https://www.npmjs.org/package/file-set) | ||
[](https://www.npmjs.org/package/file-set) | ||
[](https://www.npmjs.org/package/file-set) | ||
[](https://travis-ci.org/75lb/file-set) | ||
@@ -9,26 +9,22 @@ [](https://david-dm.org/75lb/file-set) | ||
Breaks an input list of file paths and glob expressions into three categories: files, directories and not existing. | ||
Expands a list of paths and glob expressions into three sets: "files", "directories" and "not existing". Each set in the output is a list of unique paths. | ||
**Example** | ||
## Usage | ||
Expand two glob expressions ('\*' and 'not/existing/\*'). | ||
```js | ||
const FileSet = require('file-set') | ||
const fileSet = new FileSet([ '*', 'not/existing/*' ]) | ||
console.log(fileSet) | ||
``` | ||
The output has been organised into sets. | ||
## Install | ||
```sh | ||
$ npm install file-set | ||
``` | ||
## Usage | ||
```js | ||
> 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/*' ] } | ||
notExisting: [ 'not/existing/*' ] | ||
} | ||
``` | ||
@@ -38,8 +34,5 @@ | ||
Breaks an input list of file paths and glob expressions into three categories: files, directories and not existing. | ||
<a name="module_file-set"></a> | ||
**Example** | ||
```js | ||
const FileSet = require('file-set') | ||
``` | ||
## file-set | ||
@@ -98,2 +91,2 @@ * [file-set](#module_file-set) | ||
© 2014-19 Lloyd Brookes \<75pound@gmail.com\>. Documented by [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown). | ||
© 2014-20 Lloyd Brookes \<75pound@gmail.com\>. Documented by [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown). |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
7887
-1.82%65
-7.14%90
-7.22%Updated
Updated