Socket
Socket
Sign inDemoInstall

vow-fs

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vow-fs - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

25

lib/fs.js

@@ -9,3 +9,3 @@ /**

*
* @version 0.1.2
* @version 0.1.3
*/

@@ -29,3 +29,4 @@

makeDir = promisify(fs.mkdir),
removeDir = promisify(fs.rmdir);
removeDir = promisify(fs.rmdir),
undef;

@@ -205,5 +206,11 @@ module.exports = {

* @param [mode=0777]
* @param [failIfExist=false]
* @returns {Vow.promise}
*/
makeDir : function(dirPath, mode) {
makeDir : function(dirPath, mode, failIfExist) {
if(typeof mode === 'boolean') {
failIfExist = mode;
mode = undef;
}
var _this = this,

@@ -214,3 +221,13 @@ dirName = path.dirname(dirPath);

return exists?
makeDir(dirPath, mode) :
makeDir(dirPath, mode).fail(function(e) {
if(e.code !== 'EEXIST' || failIfExist) {
throw e;
}
return _this.isDir(dirPath).then(function(isDir) {
if(!isDir) {
throw e;
}
});
}) :
_this.makeDir(dirName, mode).then(function() {

@@ -217,0 +234,0 @@ return makeDir(dirPath, mode);

2

package.json
{
"name" : "vow-fs",
"version" : "0.1.2",
"version" : "0.1.3",
"description" : "File I/O by Vow",

@@ -5,0 +5,0 @@ "homepage" : "https://github.com/dfilatov/vow-fs",

var fs = require('./lib/fs'),
path = require('path');
fs.removeDir('a').then(function(ex) {
fs.makeDir('package.json').then(function(ex) {
console.log('!');

@@ -6,0 +6,0 @@ }, function(err) {

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