GCD inspired library for JavaScript