0.1.3 • Published 2 years ago

@theevolk/lazy v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@theevolk/lazy

Downloads

A simple library for lazy loading of something.

Example

import SimpleLazyValue from '@theevolk/lazy/simple-lazy-value';

const myValueLoader = new SimpleLazyValue(
  () => {
    console.log('requesting value');
    new Promise(res => setTimeout(() => res('hello'), 1e3))
  }
);

for (let i = 0; i < 10; i++) {
  myValueLoader.request()
    .then(v => console.log('resolved', v));
}
0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago