Histone template engine JavaScript implementation