Skip to main content

Nick

Member since Mar 10, 2022

Recent Blog Comments By Nick

  • Using AbortController To Debounce setTimeout() Calls In JavaScript

    Posted on Mar 10, 2022 at 10:31 AM

    Looks like true or {once: true} as the 3rd arg to signal.addEventListener removes the listener after it's called 😉 function setAbortableTimeout(fn, ms, signal) { const timeout = setTimeout(fn, ms); signal.addEventListener("abort", () => clearTimeout(timeout), {}); };... read more »

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel