     return ->
         s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4()
 )()
-
-getKey = (id) ->
-    if typeof id is 'object'
-        id = id.get 'id'
-
-    "#{id}"
 
 Promise = Ember.RSVP.Promise
 

b64_to_utf8 = (str) ->
    unescape decodeURIComponent atob str

guid = (->
    s4 = ->
        Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1)

        throw "I DIDN'T IMPLEMENT THIS SHIT"

    createRecord: (store, type, record) -> new Promise (resolve) ->
        key = guid()
        value = serialize record, store.serializerFor type.typeKey
        
        localStorage.setItem key, value
        resolve()

    updateRecord: (store, type, record) -> new Promise (resolve) ->
        key = record.get 'id'
        value = serialize record, store.serializerFor type.typeKey

        localStorage.setItem key, value
        resolve()

    deleteRecord: (store, type, record) ->
