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

cordova-promise-fs

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-promise-fs - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

2

bower.json
{
"name": "cordova-promise-fs",
"main": "CordovaPromiseFS.js",
"version": "0.4.0",
"version": "0.4.1",
"homepage": "https://github.com/markmarijnissen/cordova-promise-fs",

@@ -6,0 +6,0 @@ "authors": [

@@ -127,5 +127,5 @@ (function(){

/* synchronous helper to get internal URL. */
function toInternlURLSync(path){
function toInternalURLSync(path){
if(path[0] !== '/') path = '/' + path;
return 'cdvfile://localhost/'+(this.options.persistent? 'persistent':'temporary') + path;
return 'cdvfile://localhost/'+(options.persistent? 'persistent':'temporary') + path;
}

@@ -229,6 +229,10 @@

var method = mustExist? file:exists;
return method(path).then(function(fileEntry){
return new Promise(function(resolve,reject){
fileEntry.remove(resolve,reject);
});
return new Promise(function(resolve,reject){
method(path).then(function(fileEntry){
if(fileEntry !== false) {
fileEntry.remove(resolve,reject);
} else {
resolve();
}
},reject);
});

@@ -325,3 +329,3 @@ }

serverUrl = encodeURI(serverUrl);
localPath = toInternlURLSync(localPath);
localPath = toInternalURLSync(localPath);
transferQueue.push([ft,isDownload,serverUrl,localPath,resolve,reject,options.trustAllHosts || false,options]);

@@ -373,2 +377,3 @@ popTransferQueue();

toDataURL:toDataURL,
options: options,
Promise: Promise

@@ -375,0 +380,0 @@ };

@@ -123,5 +123,5 @@ /**

/* synchronous helper to get internal URL. */
function toInternlURLSync(path){
function toInternalURLSync(path){
if(path[0] !== '/') path = '/' + path;
return 'cdvfile://localhost/'+(this.options.persistent? 'persistent':'temporary') + path;
return 'cdvfile://localhost/'+(options.persistent? 'persistent':'temporary') + path;
}

@@ -225,6 +225,10 @@

var method = mustExist? file:exists;
return method(path).then(function(fileEntry){
return new Promise(function(resolve,reject){
fileEntry.remove(resolve,reject);
});
return new Promise(function(resolve,reject){
method(path).then(function(fileEntry){
if(fileEntry !== false) {
fileEntry.remove(resolve,reject);
} else {
resolve();
}
},reject);
});

@@ -321,3 +325,3 @@ }

serverUrl = encodeURI(serverUrl);
localPath = toInternlURLSync(localPath);
localPath = toInternalURLSync(localPath);
transferQueue.push([ft,isDownload,serverUrl,localPath,resolve,reject,options.trustAllHosts || false,options]);

@@ -369,4 +373,5 @@ popTransferQueue();

toDataURL:toDataURL,
options: options,
Promise: Promise
};
};
{
"name": "cordova-promise-fs",
"version": "0.4.0",
"version": "0.4.1",
"description": "Cordova FileSystem convienence functions that return promises.",

@@ -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