function removeItem()

in src/actions/removeItem.ts [5:21]


    function removeItem(id: string) {
        let index = 0;
        let found = -1;
        let items = Store.items;
        for (var item of items) {
            if (item.id == id) {
                found = index;
                break;
            }

            index++;
        }

        items.splice(index, 1);

        Store.itemsLeft = Math.max(0, Store.itemsLeft - 1);
    };