ezaca / synk

Synk is a Javascript library which allows suspendable functions using ECMA6 generators.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Quick Use Guide

You should include the files of Synk, create your generator-function yielding asynchronous processes that you want to be synchronized with the function, and create a new Synk instance to handle your function.

<script type="text/javascript" src="synk.js">
<script type="text/javascript" src="synk.snippets.js">

function* myExample(arg1, arg2)
{
  alert('Synk code started');
  yield new Snippet.Delay(2000);
  alert('Synk code finished');
}

new Synk(myExample, [1, 2]);

See the documentation for details or get started.

About

Synk is a Javascript library which allows suspendable functions using ECMA6 generators.

License:MIT License


Languages

Language:HTML 85.6%Language:JavaScript 14.4%