function Store(name, callback) {
    callback = callback || function () {};

    this._dbName = name;

    if (!localStorage[name]) {
      var data = {
        todos: [],
      };

      localStorage[name] = JSON.stringify(data);
    }

    callback.call(this, JSON.parse(localStorage[name]));
  }
/**
   * Creates a new client side storage object and will create an empty
   * collection if no collection already exists.
   *
   * @param {string} name The name of our DB we want to use
   * @param {function} callback Our fake DB uses callbacks because in
   * real life you probably would be making AJAX calls
   */
Creates a new client side storage object and will create an empty
collection if no collection already exists.

@param {string} name The name of our DB we want to use
@param {function} callback Our fake DB uses callbacks because in
real life you probably would be making AJAX calls
Creates a new client side storage object and will create an empty collection if no collection already exists . @param { string } name The name of our DB we want to use @param { function } callback Our fake DB uses callbacks because in real life you probably would be making AJAX calls
function Store(name, callback) {
    callback = callback || function () {};
    this._dbName = name;
    if (!localStorage[name]) {
      var data = {
        todos: [],
      };
      localStorage[name] = JSON.stringify(data);
    }
    callback.call(this, JSON.parse(localStorage[name]));
  }
function Store ( name , callback ) { callback = callback || function ( ) { } ; this . _dbName = name ; if ( ! localStorage [ name ] ) { var data = { todos : [ ] , } ; localStorage [ name ] = JSON . stringify ( data ) ; } callback . call ( this , JSON . parse ( localStorage [ name ] ) ) ; }
Creates a new client side storage object and will create an empty
 collection if no collection already exists.
Creates a new client side storage object and will create an empty collection if no collection already exists .