Comparing version 0.2.2 to 0.2.3
@@ -195,3 +195,3 @@ 'use strict'; | ||
return readdir(dir).then(function (files) { | ||
files.filter(function (file) { | ||
files = files.filter(function (file) { | ||
return config.ignore.indexOf(file) === -1; | ||
@@ -198,0 +198,0 @@ }); |
{ | ||
"name": "safe-wipe", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/themeleon/safe-wipe", |
@@ -21,19 +21,19 @@ # safe-wipe [![npm version](http://img.shields.io/npm/v/safe-wipe.svg?style=flat-square)](https://www.npmjs.org/package/safe-wipe) | ||
| Name | Description | | ||
| ---- | ----------- | | ||
| `stdin`, `stdout`, `stderr` | Streams to use for I/O. Defaults to the `process` streams. | | ||
| `ignore` | An array of files to ignore when checking if a directory is empty. Defaults to `.DS_Store` and `Thumbs.db`. | | ||
| `parent` | A (supposed) parent directory of the directory to wipe. If the parent is contained in the directory to wipe, the process will be aborted in all cases. | | ||
| `interactive` | Whether the session is interactive. `true` by default. | | ||
| `force` | Whether to force the wipe if the folder is not empty. `false` by default. | | ||
| `silent` | The error messages are not printed if this is et to `true`. `false` by default. | | ||
| `messages` | An object of messages for user prompt and error display. | | ||
| Name | Description | Default | | ||
|-----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------| | ||
| `stdin`, `stdout`, `stderr` | Streams to use for I/O. | `process.*` streams | | ||
| `ignore` | An array of files to ignore when checking if a directory is empty. | `.DS_Store` and `Thumbs.db` | | ||
| `parent` | A (supposed) parent directory of the directory to wipe. If the parent is contained in the directory to wipe, the process will be aborted in all cases. | | | ||
| `interactive` | Whether the session is interactive. | `true` | | ||
| `force` | Whether to force the wipe if the folder is not empty. | `false` | | ||
| `silent` | The error messages are not printed if this is et to `true`. | `false` | | ||
| `messages` | An object of messages for user prompt and error display. | | | ||
The messages are: | ||
| Name | Description | | ||
| ---- | ----------- | | ||
| Name | Description | | ||
|-------------|-------------------------------------------------------------------------------------| | ||
| `contained` | Error message when the folder to wipe is contained in the configured parent folder. | | ||
| `confirm` | Text to prompt the user to confirm the (not empty) directory wipe. | | ||
| `abort` | Error message when the user refuses to wipe the folder. | | ||
| `confirm` | Text to prompt the user to confirm the (not empty) directory wipe. | | ||
| `abort` | Error message when the user refuses to wipe the folder. | | ||
@@ -44,6 +44,6 @@ The function is asynchronous and return a promise. Nothing is passed to | ||
| Code | Description | | ||
| ---- | ----------- | | ||
| `CONTAINED` | Refused to remove the directory since it's containing the supposed parent. | | ||
| `ABORT` | The user aborted the operation (or we're not in an interactive session and `config.force` is `false`). | | ||
| Code | Description | | ||
|-------------|--------------------------------------------------------------------------------------------------------| | ||
| `CONTAINED` | Refused to remove the directory since it's containing the supposed parent. | | ||
| `ABORT` | The user aborted the operation (or we're not in an interactive session and `config.force` is `false`). | | ||
@@ -50,0 +50,0 @@ Examples |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11210
1