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

merge-dirs

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

merge-dirs - npm Package Compare versions

Comparing version 0.0.2 to 0.1.0

6

index.js

@@ -16,3 +16,3 @@ /*

module.exports = function mergeDirs(f1, f2) {
module.exports = function mergeDirs(f1, f2, overwriteExistingFiles) {
var file, files, stats, _i, _len, _results;

@@ -25,5 +25,5 @@ files = fs.readdirSync(f1);

if (stats.isDirectory()) {
mergeDirs("" + f1 + "/" + file, "" + f2 + "/" + file)
mergeDirs("" + f1 + "/" + file, "" + f2 + "/" + file, overwriteExistingFiles)
} else {
if (!fs.existsSync("" + f2 + "/" + file)) {
if (!fs.existsSync("" + f2 + "/" + file) || overwriteExistingFiles) {
fs.mkdirSync(("" + f2 + "/" + file).split("/").slice(0, -1).join("/"), 0x1ed, true);

@@ -30,0 +30,0 @@ fs.writeFileSync("" + f2 + "/" + file, fs.readFileSync("" + f1 + "/" + file));

{
"name": "merge-dirs",
"version": "0.0.2",
"version": "0.1.0",
"description": "node module to synchronously and recursively merge files from one folder to another",

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

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