3주차 과제 완료 - 도서 데이터 처리 시스템#2
Open
hyojeong21 wants to merge 1 commit into
Open
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
도서 데이터 처리 시스템 과제 제출
과제 내용
JavaScript 심화 과제 - 도서 데이터 처리 시스템 구현
구현한 함수
PART 1. 배열과 배열 메서드
getTitlesByCategory()- 카테고리별 책 제목 추출getTotalPriceAbove()- 가격 합계 계산isAllSameCategory()- 동일 카테고리 여부 확인PART 2. 구조 분해 할당
formatBookLabel()- 도서 라벨 포맷splitFirstAndRest()- 첫 번째 책과 나머지 분리omitPrice()- 가격 필드 제거PART 3. Map과 Set
groupByCategory()- 카테고리별 그룹화 (Map)intersection()- 두 배열의 교집합unique()- 중복 제거PART 4. Object 유틸
getOutOfStock()- 재고 없는 책 목록getTotalStock()- 전체 재고 합산removeNullish()- null/undefined 키 제거PART 5. 배열 메서드 심화 ★
getAvgPriceByCategory()- 카테고리별 평균 가격sortBy()- 특정 키 기준 정렬flattenCategories()- 중첩 카테고리 평탄화PART 6. 이터러블 & 페이지네이션 ★★
createBookIterator()- 이터레이터 생성paginate()- 페이지네이션 처리셀프 체크리스트
npm test를 실행하여 모든 테스트가 통과하는지 확인했습니다.for반복문 대신 배열 메서드(filter,map,reduce등)를 사용했습니다.module.exports블록을 수정하지 않았습니다.console.log가 남아 있지 않습니다.🔗 관련 파일
index.js- 메인 구현 파일index.test.js- Jest 테스트 파일