Javascript formatprg and compile