providesModule const hasOwnProperty = Object . prototype . hasOwnProperty ; grep grep param { ? object } object param { function } callback param { * } context return { ? object } export function mapObject < T , U , CTX > ( object , callback , context ? ) { if ( ! object ) { return null ; } const result = { } ; for ( const name in object ) { if ( hasOwnProperty . call ( object , name ) ) { result [ name ] = callback . call ( context , object [ name ] , name , object ) ; } } return result ; }