@liplum/lateinit
v0.0.1
Published
Lazy initialized variables.
Downloads
123
Readme
Lateinit
Installation
yarn add @liplum/lateinit
# or
npm i @liplum/lateinit
# or
pnpm i @liplum/lateinit
Usage
Basic usage
import lateinit from "@liplum/lateinit"
let counter = 0
const a = lateinit(() => ++counter)
console.log()
t.assert(a() === 1)
t.assert(a() === 1)