-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
48 lines (38 loc) · 971 Bytes
/
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
const fruits = require('./fruits')
const GetAllFruits = () => {
return fruits
}
const SearchUsers = (string) => {
console.log(string)
const result = fruits.filter(x => x.current_user.includes(string))
return result
}
const GetAllParamecia = () => {
const result = fruits.filter(x => x.type === "Paramecia")
return result
}
const GetAllZoans = () => {
const result = fruits.filter(x => x.type === "Zoan")
return result
}
const GetAllMythicalZoans = () => {
const result = fruits.filter(x => x.type === "Mythical Zoan")
return result
}
const GetAllAncientZoans = () => {
const result = fruits.filter(x => x.type === "Ancient Zoan")
return result
}
const GetAllLogias = () => {
const result = fruits.filter(x => x.type === "Logia")
return result
}
module.exports = {
GetAllFruits,
SearchUsers,
GetAllParamecia,
GetAllZoans,
GetAllAncientZoans,
GetAllMythicalZoans,
GetAllLogias,
}