Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/liplum/lateinit
https://github.com/liplum/lateinit
Last synced: about 4 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/liplum/lateinit
- Owner: liplum
- Created: 2024-09-04T12:10:19.000Z (2 months ago)
- Default Branch: master
- Last Pushed: 2024-09-04T14:18:38.000Z (2 months ago)
- Last Synced: 2024-09-05T19:09:20.346Z (2 months ago)
- Language: TypeScript
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Lateinit
## Installation
```sh
yarn add @liplum/lateinit
# or
npm i @liplum/lateinit
# or
pnpm i @liplum/lateinit
```## Usage
### Basic usage
```js
import lateinit from "@liplum/lateinit"
let counter = 0
const a = lateinit(() => ++counter)
console.log()
t.assert(a() === 1)
t.assert(a() === 1)
```