Skip to content

phil-zakharov/fpJS

Repository files navigation

  • helpers for change simple function to FP style functions

Thread

  • function for create non-blocked threads

demo -> /src/async/threadDemo.html

async function createThread(element, delay) {
  let count = 1;

  const a = thread(() => {
    element.textContent = count++;
  }, delay);

  for await (const el of a) {
    if (count === 1000) {
      a.throw('stop');
    }
  }
}

About

Library for functional programing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors