We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9953750 commit 0cfef7aCopy full SHA for 0cfef7a
validation/CardCheck.js
@@ -1,4 +1,3 @@
1
-
2
function checkCard(card) {
3
return (
4
typeof card.id === "string" &&
@@ -8,17 +7,4 @@ function checkCard(card) {
8
7
)
9
}
10
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 }
+module.exports = { checkCard }
0 commit comments