|
|
@ -1,7 +1,5 @@ |
|
|
|
'use strict' |
|
|
|
'use strict' |
|
|
|
|
|
|
|
|
|
|
|
var utils = require('./utils') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function Storage () { |
|
|
|
function Storage () { |
|
|
|
this.rename = function (originalName, newName) { |
|
|
|
this.rename = function (originalName, newName) { |
|
|
|
var content = this.get(originalName) |
|
|
|
var content = this.get(originalName) |
|
|
@ -13,10 +11,6 @@ function Storage () { |
|
|
|
window.localStorage.removeItem(name) |
|
|
|
window.localStorage.removeItem(name) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.getFileContent = function (key) { |
|
|
|
|
|
|
|
return this.get(utils.fileKey(key)) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.exists = function (key) { |
|
|
|
this.exists = function (key) { |
|
|
|
return !!this.get(key) |
|
|
|
return !!this.get(key) |
|
|
|
} |
|
|
|
} |
|
|
|