Skip to main content
Deno 2 is finally here 🎉️
Learn more

Deno Once

Create a function that calls and cache a function once

Usage

import once from 'https://deno.land/x/once@typescript/index.ts'
const ran = once(Math.random)
console.log(ran() === ran()) // => true

License

MIT © Hoàng Văn Khải