npm run format

This commit is contained in:
Danny Coates 2017-07-21 17:01:26 -07:00
parent 5ed4db9689
commit 0d5fb1740d
No known key found for this signature in database
GPG key ID: 4C442633C62E00CB
11 changed files with 241 additions and 216 deletions

View file

@ -2,9 +2,9 @@ const { isFile } = require('./utils');
class Storage {
constructor(engine) {
this.engine = engine
this.engine = engine;
}
get totalDownloads() {
return Number(this.engine.getItem('totalDownloads'));
}
@ -23,7 +23,7 @@ class Storage {
set referrer(str) {
this.engine.setItem('referrer', str);
}
get files() {
const fs = [];
for (let i = 0; i < this.engine.length; i++) {
@ -49,7 +49,7 @@ class Storage {
getFileById(id) {
return this.engine.getItem(id);
}
has(property) {
return this.engine.hasOwnProperty(property);
}
@ -57,10 +57,10 @@ class Storage {
remove(property) {
this.engine.removeItem(property);
}
addFile(id, file) {
this.engine.setItem(id, JSON.stringify(file));
}
}
module.exports = Storage;
module.exports = Storage;