project pane works. I call it Tree now though. Probably too generic, whatevs"

This commit is contained in:
Corey Johnson
2011-11-03 17:49:21 -07:00
parent 2a86e3bf61
commit a4ba4305dd
13 changed files with 130 additions and 221 deletions

View File

@@ -2,12 +2,12 @@ module.exports =
class Storage
@get: (key, defaultValue) ->
try
object = JSON.parse(localStorage[key] ? "{}")
value = JSON.parse(localStorage[key] ? null) ? defaultValue
catch error
error.message += "\nGetting #{key}"
console.error(error)
object ? defaultValue
value
@set: (key, value) ->
if value == undefined