Socket
Socket
Sign inDemoInstall

angular-evaporate

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-evaporate - npm Package Compare versions

Comparing version 2.1.2 to 2.2.0

bower.json

19

lib/angular-evaporate.js

@@ -103,2 +103,4 @@ ;(function () {

* @property {Number} $seconds - estimated elapsed time
* @property {Number} $speed - upload speed
* @property {String} $speedStr - upload speed in human readable format
*/

@@ -151,2 +153,5 @@ var AngularEvaporateUpload = function (ae, config) {

);
that.$speed = (that.$percent * that.file.size * 10) /
(now - that.$started);
that.$speedStr = ae.$speedStr(that.$speed);
}

@@ -235,2 +240,16 @@ }

};
/**
* Default upload upload speed function.
* @params {size in bytes}
* @returns {String} - speed of the upload in human readable format
*/
AngularEvaporate.prototype.$speedStr = function (size) {
var units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
var i = 0;
while(size >= 1024) {
size /= 1024;
++i;
}
return size.toFixed(2).replace('.00', '') + ' ' + units[i] + '/s';
};

@@ -237,0 +256,0 @@ // api

2

package.json
{
"version": "2.1.2",
"version": "2.2.0",
"name": "angular-evaporate",

@@ -4,0 +4,0 @@ "description": "AngularJS module for the EvaporateJS library",

@@ -11,3 +11,3 @@ ## angular-evaporate

+ calculates name, url, content type for a new upload,
+ calculates progress percent and estimated time,
+ calculates progress percent, speed and estimated time,
+ saves status updates with timestamps,

@@ -160,2 +160,4 @@ + saves info, warning and error messages,

| `$seconds` | `Number` | optional | estimated elapsed time
| `$speed` | `Number` | optional | upload speed
| `$speedStr` | `String` | optional | upload speed in human readable format

@@ -162,0 +164,0 @@ ### API

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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