https://github.com/matthewbub/execute-once
deploy scoped packages to npm
https://github.com/matthewbub/execute-once
Last synced: 2 months ago
JSON representation
deploy scoped packages to npm
- Host: GitHub
- URL: https://github.com/matthewbub/execute-once
- Owner: matthewbub
- Created: 2021-03-27T01:06:37.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-03-29T14:21:36.000Z (over 5 years ago)
- Last Synced: 2026-03-29T18:37:54.935Z (3 months ago)
- Language: TypeScript
- Homepage: https://javascript.plainenglish.io/publish-a-scoped-package-to-npm-using-typescript-b36f2f7475c9
- Size: 49.8 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# @hi-matbub/once
A function that executes once, and returns `undefined` on sequential calls. Learn how to build a scoped package yourself [here!](https://javascript.plainenglish.io/publish-a-scoped-package-to-npm-using-typescript-b36f2f7475c9)
## Setup
```sh
npm i @hi-matbub/once
```
## Usage
```js
const { executeOnce } = require("@hi-matbub/once");
const once = executeOnce();
for (let i = 0; i < 3; i++){
console.log(once(() => "Hello, World!"));
}
```