Skip to content
New issue

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

Default 값 설정 가능 #3

Closed
cjaewon opened this issue Oct 9, 2019 · 2 comments
Closed

Default 값 설정 가능 #3

cjaewon opened this issue Oct 9, 2019 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@cjaewon
Copy link
Contributor

cjaewon commented Oct 9, 2019

데이터가 없을 때 빈 문자열로 나오는 것을
유저가 설정 할 수 있으면 더 좋을 것 같습니다!

//example
school.getMeal(default = '급식 없음')
@leegeunhyeok leegeunhyeok self-assigned this Oct 16, 2019
@leegeunhyeok leegeunhyeok added the enhancement New feature or request label Oct 16, 2019
@leegeunhyeok
Copy link
Owner

해당 기능은 e49a42에서 구현되어 2.2.0 버전으로 배포되었습니다.

아래와 같이 사용하시면 됩니다.

// 년도값 대신 옵션 객체를 전달하여 데이터 수집 가능
const optionMeal = await school.getMeal({
  year: 2018,
  month: 9,
  default: '급식이 없습니다'
})
const optionCalendar = await school.getCalendar({
  // year, month 생략시 현재 시점 기준으로 조회됨
  default: '일정 없는 날'
})

console.log(optionMeal)
console.log(optionCalendar)

감사합니다.

@cjaewon
Copy link
Contributor Author

cjaewon commented Oct 20, 2019

👍 감사합니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants