You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
exportconstbefore=<P,Fextends(...args: any[])=>P>(n: number,func: F): F=>{if(!Number.isInteger(n)||n<=1){thrownewError(`n must be an integer greater than one.`);}letcounter=1;return((...args: Parameters<F>)=>{if(counter>=n){thrownewError(`Function has been called ${n-1} times already, which is the limit.`);}counter++;returnfunc(...args);})asF;};
If it looks good, I proceed with enhancing documentation and then I submit a pull request!
Hello, @raon0211!
Can I work
before
of #91 ?If it's okay to work on it,
before
andafter
seem very similar. Is it okay if I dug up a new issue for after and work on it together?The text was updated successfully, but these errors were encountered: