remove(id, callback){
        const data = JSON.parse(this.memoryStorage[this._dbName]);
        let todos = data.todos;
        const len = todos.length;

        for (let i = 0; i < todos.length; i++) {
            if (todos[i].id == id) {
                todos.splice(i, 1);
                break;
            }
        }

        this.memoryStorage[this._dbName] = JSON.stringify(data);

        if (callback) {
            callback.call(this, JSON.parse(this.memoryStorage[this._dbName]).todos);
        }
    }
/**
     * Will remove an item from the Store based on its ID
     *
     * @param {number} id The ID of the item you want to remove
     * @param {function} callback The callback to fire after saving
     */
Will remove an item from the Store based on its ID
@param {number} id The ID of the item you want to remove
@param {function} callback The callback to fire after saving
Will remove an item from the Store based on its ID @param { number } id The ID of the item you want to remove @param { function } callback The callback to fire after saving
remove(id, callback){
        const data = JSON.parse(this.memoryStorage[this._dbName]);
        let todos = data.todos;
        const len = todos.length;
        for (let i = 0; i < todos.length; i++) {
            if (todos[i].id == id) {
                todos.splice(i, 1);
                break;
            }
        }
        this.memoryStorage[this._dbName] = JSON.stringify(data);
        if (callback) {
            callback.call(this, JSON.parse(this.memoryStorage[this._dbName]).todos);
        }
    }
remove ( id , callback ) { const data = JSON . parse ( this . memoryStorage [ this . _dbName ] ) ; let todos = data . todos ; const len = todos . length ; for ( let i = 0 ; i < todos . length ; i ++ ) { if ( todos [ i ] . id == id ) { todos . splice ( i , 1 ) ; break ; } } this . memoryStorage [ this . _dbName ] = JSON . stringify ( data ) ; if ( callback ) { callback . call ( this , JSON . parse ( this . memoryStorage [ this . _dbName ] ) . todos ) ; } }
Will remove an item from the Store based on its ID
 @param {number} id The ID of the item you want to remove
 @param {function} callback The callback to fire after saving
Will remove an item from the Store based on its ID @param { number } id The ID of the item you want to remove @param { function } callback The callback to fire after saving