lazy-val

Lazy value.

Usage no npm install needed!

<script type="module">
  import lazyVal from 'https://cdn.skypack.dev/lazy-val';
</script>

README

lazy-val

Lazy value.

class Lazy<T> {
    constructor(creator: () => Promise<T>)
    readonly hasValue: boolean
    value: Promise<T>
}