[JS] Pre-build duration array