_.before

before_.before(count, function)
Creates a version of the function that can be called no more than count times. The result of the last function call is memoized and returned when count has been reached.

1
2
3
4
5
var monthlyMeeting = _.before(3, askForRaise);
monthlyMeeting();
monthlyMeeting();
monthlyMeeting();
// the result of any subsequent calls is the same as the second call
doc_Underscore
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.