ijob
Helper for creating cancellable promise-returning functions.
Create simple job
import job from 'ijob'; {} {} {} const myJob = ; myJob;myJob;myJob;myJob;// job.cancel();
Support (Async) Generator
import job from 'ijob';let count = 0;const Increase = count++;const Delay = ms resolve ; ;
Perform the latest job
import job from 'ijob';const callServerApi = ;const renderProductList = ;const SearchProducts = job;
Waiting for function execution
import job from 'ijob'; const f1 = job; const f2 = job; const result1 = await job; // => result1 = 2const result2 = await job; // => result2 = [1, 2]