JavaScript spec helper