diff options
| author | Juuso Lapinlampi <wub@partyvan.eu> | 2015-09-27 21:48:08 +0200 |
|---|---|---|
| committer | Juuso Lapinlampi <wub@partyvan.eu> | 2015-09-27 21:52:04 +0200 |
| commit | e6f354a9be648a366df39b9dac75eb58a99490dd (patch) | |
| tree | a963b718057f4ad0bcd6f43cb070949de7883c4a /js | |
| parent | cd23640ded6a29071d5b46a6594efa3ad5ac7c2b (diff) | |
Add missing commas before closing bracket/curly brace
This adds commas to cheesesteak.js.
Something to note, the Airbnb ES5 style guide opposes a trailing comma.
The latest ES6 edition endorses adding a trailing comma, explaining it
leads to cleaner Git diffs. Endorse the ES6 standard, that's also the
Airbnb preset in JSCS.
Fixes JSCS requireTrailingComma warnings using Airbnb preset.
Diffstat (limited to 'js')
| -rw-r--r-- | js/cheesesteak.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/js/cheesesteak.js b/js/cheesesteak.js index a8b0d02..fcfe607 100644 --- a/js/cheesesteak.js +++ b/js/cheesesteak.js @@ -64,18 +64,18 @@ return this.reduce(function(prev, curr) { return prev + curr.size; }, 0); - } + }, }); // Utility to convert bytes into human units var humanSize = { get: function humanSize() { var units = [ - 'B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB' + 'B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB', ]; var e = Math.floor(Math.log(this.size) / Math.log(1024)); return (this.size / Math.pow(1024, e)).toFixed(2) + ' ' + units[e]; - } + }, }; Object.defineProperty(FileList.prototype, 'humanSize', humanSize); Object.defineProperty(File.prototype, 'humanSize', humanSize); @@ -83,7 +83,7 @@ var percentUploaded = { get: function percentUploaded() { return this.uploadedSize / this.size; - } + }, }; Object.defineProperty(FileList.prototype, 'percentUploaded', percentUploaded); @@ -94,14 +94,14 @@ return this.reduce(function(prev, curr) { return prev + (curr.uploadedSize || 0); }, 0); - } + }, }); // Object URL stuff Object.defineProperty(File.prototype, 'url', { get: function getURL() { return window.URL.createObjectURL(this); - } + }, }); File.revokeURL = function revokeURL(url) { window.URL.revokeObjectURL(url); @@ -130,7 +130,7 @@ this.opts = merge({ 'field': 'files[]', 'method': 'POST', - 'data': {} + 'data': {}, }, opts); }; |
