ChickenKyiv / ChickenKyiv/recipe-app-react-native
Helper file misteriously was clean up
- Dominant language
- JavaScript
- Stars
- 22
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Description
# Description/Steps to reproduce
**UPD. at Expo we have a project with Helper file from groceristar-app**
ok, a bit info.
at October, 3 I create a task in order to move default functions that we have in our file:
`src/config/HelperFunctions.js` into our groceristar-fetch module. and i remember that file has a lot of data inside. Today we checked this file and didn't find that methods(not sure why).
difference can be seen here:


Code that is missing(yep, a bad way to manage changes, but fast):
```
import gf from '@groceristar/groceristar-fetch/groceristar';
import uuid from 'uuidv4';
const getOldGrocery = gf.getGrocery();
let newGrocery = getOldGrocery;
export const getAllDepartmentList = () => {
const newAllDepartments = gf.getAllDepartments();
const newAllDepartmentsObject = newAllDepartments.map(item => ({
key: uuid(),
departmentName: item,
}));
return newAllDepartmentsObject;
};
export const getAllIngredientsList = DeparmentName => {
const Ingredients = gf.getAllIngredientsByOneDepartment(`${DeparmentName}`);
const IngredientsObject = Ingredients.map(item => ({
key: uuid(),
IngredientName: item,
isChecked: false,
}));
return IngredientsObject;
};
export const getAllGrocery = () => {
const GroceryObjectArray = newGrocery.map(item => ({
key: uuid(),
IngredientName: item,
}));
return GroceryObjectArray;
};
export const getAllGroceryDepartment = departmentArray => {
const departmentArrayObject = departmentArray.map(item => ({
key: uuid(),
departmentName: item,
isChecked: false,
}));
return departmentArrayObject;
};
export const createNewGroceryList = newDepartment => {
const isAvailable = newGrocery.filter(item => {
if (item.name === newDepartment.name) {
return true;
}
return false;
});
if (isAvailable.length === 0) {
const newDepartmentList = [...newGrocery, newDepartment];
newGrocery = newDepartmentList;
}
};
```
# Expected result
# Additional information
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.