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

cpr

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cpr - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

36

lib/index.js

@@ -89,22 +89,24 @@ var fs = require('graceful-fs');

to = options.toHash[dir];
fs.stat(to, stack.add(function(err, s) {
if (s && s.isDirectory()) {
if (options.overwrite) {
rimraf(to, stack.add(function() {
mkdirp(to, stat.mode, stack.add(function(err) {
if (err) {
options.errors.push(err);
}
if (to && typeof to === 'string') {
fs.stat(to, stack.add(function(err, s) {
if (s && s.isDirectory()) {
if (options.overwrite) {
rimraf(to, stack.add(function() {
mkdirp(to, stat.mode, stack.add(function(err) {
if (err) {
options.errors.push(err);
}
}));
}));
}
} else {
mkdirp(to, stat.mode, stack.add(function(err) {
if (err) {
options.errors.push(err);
}
}));
}
} else {
mkdirp(to, stat.mode, stack.add(function(err) {
if (err) {
options.errors.push(err);
}
}));
}
}));
}));
}
});

@@ -111,0 +113,0 @@

@@ -5,3 +5,3 @@ {

"author": "Dav Glass <davglass@gmail.com>",
"version": "0.0.2",
"version": "0.0.3",
"dependencies": {

@@ -8,0 +8,0 @@ "graceful-fs": "~1.1.14",

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