@gradealabs/fs-utils
Advanced tools
Comparing version 2.0.4 to 2.1.4
{ | ||
"name": "@gradealabs/fs-utils", | ||
"version": "2.0.4", | ||
"version": "2.1.4", | ||
"main": "lib/index.js", | ||
@@ -8,2 +8,3 @@ "description": "A package that exposes several useful file system utility functions.", | ||
"setup": "ts-node ./scripts/setup", | ||
"prepublish": "npm run build", | ||
"audit": "npm outdated --long", | ||
@@ -10,0 +11,0 @@ "test": "cross-env NODE_ENV=test TS_NODE_PROJECT=./tsconfig.test.json nyc mocha", |
@@ -55,2 +55,18 @@ # FS Utils | ||
**rmdirfiles(dirPath)** | ||
Removes only the files inside a directory, but not the directory itself. | ||
Example: | ||
import { rmdirfiles, mkdir, touch } from '@gradealabs/fs-utils' | ||
Promise.resolve() | ||
.then(() => mkdir('dist/a')) | ||
.then(() => mkdir('dist/b')) | ||
.then(() => touch('dist/file.js')) | ||
.then(() => rmdirfiles('dist')) | ||
.then(() => console.log('dist has been cleaned out')) | ||
.catch(error => console.error(error)) | ||
**readdir(dirPath, options)** | ||
@@ -57,0 +73,0 @@ |
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
20996
10
389
164
0
6