Skip to content

Create a function that calls and cache a function once

License

Notifications You must be signed in to change notification settings

KSXGitHub/deno-once

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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