after
The opposite of _.before; this method creates a function that invokes
func once it's called n or more times.
Since
0.1.0
Arguments
func(Function): The function to restrict.n(number): The number of calls beforefuncis invoked.
Returns
(Function): Returns the new restricted function.
Example
var saves = ['profile', 'settings'];
var done = _.after(function() {
console.log('done saving!');
}, saves.length);
_.forEach(function(type) {
asyncSave({ 'type': type, 'complete': done });
}, saves);
// => Logs 'done saving!' after the two async saves have completed.