3.1.10 • Published 6 years ago

fake-restaurant v3.1.10

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

fake-restaurant

This is a simple package to manage the orders on a restaurant.

Installation

$ npm install fake-restaurant

API

var fakeRestaurant = require('fake-restaurant')

The fakeRestaurant object exposes various methods to manage the orders of a restaurant.

You can use these methods to manage the array:

fakeRestaurant.getAllOrders();
/*
  Returns all the Orders (used by the admin of the restaurant).
*/
fakeRestaurant.getAllMenuItems();
/*
  Returns all the menu items.
*/
fakeRestaurant.getOrderById(id);
/*
  Returns the order with the specified id or null if not found.
*/
fakeRestaurant.addOrder(newOrder, client);
/*
  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.deleteOrder(id);
/*
  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.
*/
fakeRestaurant.setOrderStatus = (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.getProfit();
/*
  This method return the profit of the restaurant
*/
fakeRestaurant.reset();
/*
  This method restores the order array at the initial state
  and returns it.
*/

Known issues

. This is only a dummy package

License

MIT

3.1.10

6 years ago

3.1.9

6 years ago

2.1.9

6 years ago

2.0.9

6 years ago

2.0.8

6 years ago

2.0.7

6 years ago

1.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago