New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@gradealabs/fs-utils

Package Overview
Dependencies
Maintainers
4
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gradealabs/fs-utils - npm Package Compare versions

Comparing version 2.0.4 to 2.1.4

lib/rmdirfiles.js

3

package.json
{
"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 @@

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