The number of calls before func
is invoked.
The function to restrict.
Returns the new restricted function.
5.3.0
const saves = ['profile', 'settings']
const done = after(saves.length, () => console.log('done saving!'))
forEach(saves, type => asyncSave({ 'type': type, 'complete': done }))
// => Logs 'done saving!' after the two async saves have completed.
The opposite of
before
. This method creates a function that invokesfunc
once it's calledn
or more times.