-
Notifications
You must be signed in to change notification settings - Fork 256
/
Copy pathindex.js
28 lines (25 loc) · 1.11 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/**
* Adds a new store to the very end of the list.
* @param {Object[]]} stores - An array of store objects.
* @param {Object} store - An object representing a single store. See the instructions for details on its shape.
* @returns {Object[]} The same `stores` array that was inputted.
*/
function addNewStore(stores, store) {}
/**
* Removes a store object at the given position.
* @param {Object[]]} stores - An array of store objects.
* @param {number} index - A number representing the index of the store to be removed from the array.
* @returns {Object[]} The same `stores` array that was inputted.
*/
function removeStoreAtPosition(stores, index) {}
/**
* Creates a duplicate of the `store` object. No references should be shared between the inputted `store` and the result.
* @param {Object} store - An object representing a single store. See the instructions for details on its shape.
* @returns {Object} The duplicated store object. This should not be the same as the store that was inputted.
*/
function duplicateStore(store) {}
module.exports = {
addNewStore,
removeStoreAtPosition,
duplicateStore,
};