Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fs-del

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fs-del - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

23

index.js

@@ -22,5 +22,19 @@ /**

del.empty = function(dirs) {
if (!dirs) {
return;
}
if (!util.isArray(dirs)) {
dirs = [dirs];
}
dirs.forEach(function(f) {
_remove(f, true);
});
};
module.exports = del;
function _remove(file) {
function _remove(file, empty) {
if (!fs.existsSync(file)) {

@@ -36,6 +50,9 @@ return;

});
fs.rmdirSync(file);
if (!empty) {
fs.rmdirSync(file);
}
} else {
fs.unlinkSync(file);
}
}
}

2

package.json
{
"name": "fs-del",
"version": "1.0.0",
"version": "1.0.1",
"description": "delete files and folders",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -16,2 +16,6 @@ /**

});
it.only('empty', function() {
del.empty('E:/test/s3')
})
});
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