We sought to determine if insulin detemir ( IDet ) is noninferior to insulin neutral protamine Hagedorn ( NPH ) for the treatment of gestational diabetes mellitus ( GDM ) and type 2 diabetes mellitus ( T2DM ) in pregnancy .