export function formatObjectInfo ( obj ) { let name ; let type ; try { if ( typeof obj === 'function' ) { name = obj . name || '[anonymous function]' ; type = typeof obj ; } else { name = String ( obj ) ; type = obj && obj . constructor . name ; } return `${ name }<${ type }>` ; } catch ( e ) { return String ( obj ) ; } }