 
   # Search `localStorage` for all keys that match the specified regular
   # expression.
-  search: (regex) ->
-    key for own key of localStorage when regex.test key
+  search: (regex) -> key for own key of localStorage when regex.test key
 
   # Set the value of the specified key(s) in `localStorage`.  
   # `keys` can either be a string for a single key (in which case `value`
   # should also be specified) or a map of key/value pairs.  
   # If the specified value is `undefined`, assign that value directly to the
   # key; otherwise transform it to a JSON string beforehand.
-  set: (keys, value) ->
-    switch typeof keys
-      when 'object' then @set key, value for own key, value of keys
-      when 'string'
-        oldValue = @get keys
-        localStorage[keys] = tryStringify value
-        oldValue
+  set: (keys, value) -> switch typeof keys
+    when 'object' then @set key, value for own key, value of keys
+    when 'string'
+      oldValue = @get keys
+      localStorage[keys] = tryStringify value
+      oldValue
 
 # Public classes
 # --------------

# Inlcuding, but not limited to, data transformations and migration.
class store.Updater extends utils.Class

  # Create a new instance of `Updater` for `namespace`.
  constructor: (@namespace) ->
    # Indicate whether or not `namespace` existed initially.
    @isNew = not @exists()

  # Determine whether or not this namespace exists.
  exists: ->
    store.get("updates.#{@namespace}")?

  # Remove this namespace.
  remove: ->
    store.modify 'updates', (updates) =>
      delete updates[@namespace]

  # Rename this namespace to `namespace`.
  rename: (namespace) ->
    store.modify 'updates', (updates) =>
      updates[namespace] = updates[@namespace] if updates[@namespace]?
      delete updates[@namespace]
      @namespace = namespace

  # Update this namespace to `version` using the `processor` provided when
  # `version` is newer.
  update: (version, processor) ->
    store.modify 'updates', (updates) =>
      updates[@namespace] ?= ''
      if updates[@namespace] < version
        processor?()
        updates[@namespace] = version

# Configuration
# -------------


# Attempt to parse `value` as a JSON object if it's not `null`; otherwise just
# return `value`.
tryParse = (value) -> if value? then JSON.parse value else value

# Attempt to stringify `value` in to a JSON string if it's not `null`;
# otherwise just return `value`.
tryStringify = (value) -> if value? then JSON.stringify value else value

# Store setup
# -----------
