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

rmrf

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rmrf - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

test/index.js

23

index.js
var fs = require('fs')
var rmrf = module.exports = function(dirPath) {
var files = fs.readdirSync(dirPath)
if (files.length > 0)
for (var i = 0; i < files.length; i++) {
var filePath = dirPath + '/' + files[i]
if (fs.statSync(filePath).isFile())
fs.unlinkSync(filePath)
else
rmrf(filePath)
}
fs.rmdirSync(dirPath)
var files
try { files = fs.readdirSync(dirPath) } catch(e) {}
if (files) {
if (files.length > 0)
for (var i = 0; i < files.length; i++) {
var filePath = dirPath + '/' + files[i]
if (fs.statSync(filePath).isFile())
fs.unlinkSync(filePath)
else
rmrf(filePath)
}
fs.rmdirSync(dirPath)
}
}
{
"name": "rmrf",
"version": "1.0.0",
"version": "1.0.1",
"description": "slim and synchronous `rm -rf` for node",

@@ -15,3 +15,6 @@ "main": "index.js",

"license": "MIT",
"readmeFilename": "README.md"
"readmeFilename": "README.md",
"devDependencies": {
"mocha": "~1.12.0"
}
}

Sorry, the diff of this file is not supported yet

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