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.1 to 1.0.2

8

index.js
var fs = require('fs')
var rmrf = module.exports = function(dirPath) {
var files
try { files = fs.readdirSync(dirPath) } catch(e) {}
if (files) {
if (files.length > 0)
if (fs.existsSync(dirPath)) {
var files = fs.readdirSync(dirPath)
if (files && files.length > 0) {
for (var i = 0; i < files.length; i++) {

@@ -15,4 +14,5 @@ var filePath = dirPath + '/' + files[i]

}
}
fs.rmdirSync(dirPath)
}
}
{
"name": "rmrf",
"version": "1.0.1",
"description": "slim and synchronous `rm -rf` for node",
"version": "1.0.2",
"description": "No BS synchronous `rm -rf` for node.js",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "mocha test index.js"
},

@@ -9,0 +9,0 @@ "repository": {

node-rmrf
=========
slim and synchronous `rm -rf` for node
No BS synchronous `rm -rf` for [node.js](http://nodejs.org/).

@@ -6,8 +6,8 @@ var rmrf = require('../index.js')

before(function(){
try { fs.readdirSync(__dirname + '/exists') } catch(e){
fs.mkdirSync(__dirname + '/exists')
fs.mkdirSync(__dirname + '/exists/nested')
}
})
// not bothering with 'before' as it was unreliable
if (!fs.existsSync(__dirname + '/exists')) {
fs.mkdirSync(__dirname + '/exists')
fs.mkdirSync(__dirname + '/exists/nested')
fs.openSync( __dirname + '/exists/nested/empty.txt', 'w')
}

@@ -14,0 +14,0 @@ describe('rmrf', function(){

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