Skip to content

telecomsante/spawn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spawn

co-like function that work in the browser

inspired by https://jakearchibald.com/2014/es7-async-functions/

Install

with bower:

bower install spawn

Example

spawn(function* () {
  const result = yield Promise.resolve(true);
  return result;
}).then(function (value) {
  console.log(value);
}, function (err) {
  console.error(err);
});

About

co-like function that work in the browser

Resources

License

Stars

Watchers

Forks

Packages

No packages published