risto
v1.0.8
Published
A functions package that simulates restaurant orders
Downloads
8
Readme
Order restaurant simulator
a simple package with functions to manage orders of a restaurant
Install
$ npm install risto
Usage
var orders = require('risto');
Get all the orders from your array with getOrders()
.
orders.getOrders();
Get an order by status with getOrderByStatus(status)
.
orders.getOrderByStatus(status);
Add a new order with addOrder(dishes, bill)
. The package will automatically assign an id and name through your token to the new order.
orders.addOrder(dishes, bill);
Delete an order by id with deleteOrder(id)
.
orders.deleteOrder(id);
Modify status with setOrder(id, status)
.
orders.setOrder(id, status);
Get all the orders by an user through his token getOrderByToken(token)
.
orders.getOrderByToken(token);
Reset original orders array with reset()
.
orders.reset();