import { valueFromObject } from './valueFromObject' ; /**
 * A higher-order function that gets a value from the given object. Designed to work with `styled-components`
 */ export const fromProps = < T > ( identifier , callback ? ) : any => ( source ) => { try { const value = valueFromObject < T > ( identifier , source ) ; return callback ? callback ( value ) : value ; } catch ( e ) { return undefined ; } } ;