JS translation of fimp