1.0.1 • Published 4 years ago

@hi-matbub/once v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

@hi-matbub/once

A function that executes once, and returns undefined on sequential calls.

Setup

npm i @hi-matbub/once

Usage

const { executeOnce } = require("@hi-matbub/once");

const once = executeOnce();

for (let i = 0; i < 3; i++){
  console.log(once(() => "Hello, World!"))
}
1.0.1

4 years ago

1.0.0

4 years ago