[part] js refactor