Port of hammock from dart to js