Skip to content

Commit 0cfef7a

Browse files
committed
bit fix
1 parent 9953750 commit 0cfef7a

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

validation/CardCheck.js

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
function checkCard(card) {
32
return (
43
typeof card.id === "string" &&
@@ -8,17 +7,4 @@ function checkCard(card) {
87
)
98
}
109

11-
function checkCardsArr(cardsArr) {
12-
if (!Array.isArray(cardsArr)) return false
13-
else if (cardsArr.length === 0) return true
14-
else {
15-
let res = true
16-
cardsArr.forEach((card) => {
17-
if (typeof card !== "object") res = false
18-
else if (!checkCard(card)) res = false
19-
})
20-
return res
21-
}
22-
}
23-
24-
module.exports = { checkCardsArr, checkCard }
10+
module.exports = { checkCard }

0 commit comments

Comments
 (0)