We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
배열에 있는 값의 합을 계산합니다.
기본적으로 숫자 배열에서 값의 합을 계산합니다. 그 외 타입의 경우 두 번째 인자인 iteratee 함수의 결과를 통해 값을 합산합니다.
숫자 배열
iteratee
타입 가드가 원활하게 진헹되어야 합니다. ex) min, max
const arr = [1, 2, 3, 4, 5]; const result = sum(arr); // 15 // iteratee가 없는데 숫자 외 타입 배열을 넣으면 타입 에러 발생해야 함
const arr = [ { value: 1 }, { value: 2 }, { value: 3 }, { value: 4 }, { value: 5 }, ]; const result = sum(arr, (item) => item.value); // 15 // 숫자를 반환하지 않으면 타입 에러 발생해야 함
The text was updated successfully, but these errors were encountered:
안녕하세요 @ssi02014 !
해당 이슈와 #262 를 제가 맡고 싶습니다 !
Sorry, something went wrong.
@Collection50 감사합니다! 할당완료했습니다! 타입가드 쪽은 min,max와 유사하게 작업해주시면 감사드립니다 :)
확인입니다 !
@ssi02014 해당 이슈 close 해주시면 좋을 것 같아요 !!
Collection50
No branches or pull requests
Package Scope
Overview
배열에 있는 값의 합을 계산합니다.
기본적으로
숫자 배열
에서 값의 합을 계산합니다. 그 외 타입의 경우 두 번째 인자인iteratee
함수의 결과를 통해 값을 합산합니다.타입 가드가 원활하게 진헹되어야 합니다. ex) min, max
Default
Iteratee
The text was updated successfully, but these errors were encountered: