fake-restaurant
This is a simple package to manage the orders on a restaurant.
Installation
$ npm install fake-restaurant
API
var fakeRestaurant =
The fakeRestaurant
object exposes various methods to manage the orders of a restaurant.
You can use these methods to manage the array:
fakeRestaurant;/* Returns all the Orders (used by the admin of the restaurant).*/
fakeRestaurant;/* Returns all the menu items.*/
fakeRestaurant;/* Returns the order with the specified id or null if not found.*/
fakeRestaurant;/* Push a new order at the end of the array, newOrder must be an object with 2 properties: items (array of menu items) and price (dummy stuff). This method returns the new order added, or null if the newOrder object does not contain the correct properties.*/
fakeRestaurant;/* Used by admin. Delete the order with the specified id and returns it. This method return null if the user to delete is not found.*/
fakeRestaurantsetOrderStatus = id newOrderStatus;/* Modify the order status with the specified id and returns the order. This method return null if the order to modify is not found.*/
fakeRestaurant;/* This method return the profit of the restaurant*/
fakeRestaurant;/* This method restores the order array at the initial state and returns it.*/
Known issues
. This is only a dummy package