-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #177 from INtiful/feat/hyuk/KAN-119-auto-participate
feat: 모임 만들기 내 기능 추가 및 리팩토링
- Loading branch information
Showing
3 changed files
with
29 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// 모든 gatheringType이 false인지 확인 (boolean) | ||
|
||
const objectCheckFalseValue = (obj: Record<string, boolean>): boolean => { | ||
return Object.values(obj).every((value) => value === false); | ||
}; | ||
|
||
export default objectCheckFalseValue; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// true인 key 값만 필터링해서 문자열로 반환하는 함수 | ||
|
||
const objectExtractTrueValue = (obj: Record<string, boolean>) => { | ||
const selectedGatheringType = String( | ||
Object.keys(obj).filter((key) => obj[key]), | ||
); | ||
return selectedGatheringType; | ||
}; | ||
|
||
export default objectExtractTrueValue; |