Awesome Lists

onetime

by sindresorhus

JavaScriptpushed almost 3 years ago

Ensure a function is only called once

AI summary

Call limiter

Ensures a function is only called once by wrapping it in a wrapper function that throws an error if called again

stars
162
forks
14
watching
8
awesome list
1
View on GitHub

Embed the badge

Show how many awesome lists link to your project. The count updates automatically.

Awesome Lists badge
Markdown
[![Awesome Lists Badge](https://awesome.facts.dev/shield/sindresorhus/onetime/links.svg)](https://awesome.facts.dev/awesome/sindresorhus/onetime)
HTML
<a href="https://awesome.facts.dev/awesome/sindresorhus/onetime"><img src="https://awesome.facts.dev/shield/sindresorhus/onetime/links.svg" alt="Awesome Lists Badge" /></a>
Image URL
https://awesome.facts.dev/shield/sindresorhus/onetime/links.svg

Add a GitHub project

Missing a project or an awesome list? Paste its GitHub URL and we fetch it right away.