Latest
function after
import { after } from "https://dotland.deno.dev/x/lodash_es@v0.0.2/src/function.js";

The opposite of _.before; this method creates a function that invokes func once it's called n or more times.

Examples

var saves = ['profile', 'settings'];

var done = _.after(saves.length, function() { console.log('done saving!'); });

_.forEach(saves, function(type) { asyncSave({ 'type': type, 'complete': done }); }); // => Logs 'done saving!' after the two async saves have completed.

Parameters

n

The number of calls before func is invoked.

func

The function to restrict.