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

cordova-file-cache

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-file-cache - npm Package Compare versions

Comparing version 0.13.0 to 0.14.0

11

dist/CordovaFileCache.js

@@ -179,2 +179,3 @@ var CordovaFileCache =

var total = self._downloading.length + queue.length;
var percentage = 0;

@@ -193,5 +194,7 @@ // download every file in the queue (which is the diff from _added with _cached)

ev.percentage = done / total;
if(ev.loaded > 0 && ev.total > 0 && index !== total){
if(ev.loaded > 0 && ev.total > 0 && done !== total){
ev.percentage += (ev.loaded / ev.total) / total;
}
ev.percentage = Math.max(percentage,ev.percentage);
percentage = ev.percentage;
onprogress(ev);

@@ -299,3 +302,7 @@ };

} else {
return this.localRoot + hash(url) + url.substr(url.lastIndexOf('.'));
var ext = url.substr(url.lastIndexOf('.'));
if ((ext.indexOf("?") > 0) || (ext.indexOf("/") > 0)) {
ext = ".txt";
}
return this.localRoot + hash(url) + ext;
}

@@ -302,0 +309,0 @@ };

@@ -132,2 +132,3 @@ var hash = require('./murmerhash');

var total = self._downloading.length + queue.length;
var percentage = 0;

@@ -146,5 +147,7 @@ // download every file in the queue (which is the diff from _added with _cached)

ev.percentage = done / total;
if(ev.loaded > 0 && ev.total > 0 && index !== total){
if(ev.loaded > 0 && ev.total > 0 && done !== total){
ev.percentage += (ev.loaded / ev.total) / total;
}
ev.percentage = Math.max(percentage,ev.percentage);
percentage = ev.percentage;
onprogress(ev);

@@ -252,3 +255,7 @@ };

} else {
return this.localRoot + hash(url) + url.substr(url.lastIndexOf('.'));
var ext = url.substr(url.lastIndexOf('.'));
if ((ext.indexOf("?") > 0) || (ext.indexOf("/") > 0)) {
ext = ".txt";
}
return this.localRoot + hash(url) + ext;
}

@@ -255,0 +262,0 @@ };

2

package.json
{
"name": "cordova-file-cache",
"version": "0.13.0",
"version": "0.14.0",
"description": "Cordova File Cache",

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

@@ -131,2 +131,7 @@ cordova-file-cache

### 0.14.0 (07/02/2016)
* Handle REST api calls better (thanks @xontab)
* Fix download onprogress index
### 0.13.0 (23/01/2016)

@@ -136,7 +141,7 @@

### 0.12.0 (18/03/2014)
### 0.12.0 (18/03/2015)
* Export hash function as CordovaFileCache.hash (needed by App Loader)
### 0.11.0 (17/03/2014)
### 0.11.0 (17/03/2015)

@@ -143,0 +148,0 @@ * Update CordovaPromiseFS dependency.

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