Created
July 2, 2024 13:01
-
-
Save calebporzio/9e8efeeda572b1c0e43c8faac5e02975 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function detangle() { | |
let blocked = false | |
return callback => (...args) => { | |
if (blocked) return | |
blocked = true | |
callback(...args) | |
blocked = false | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment