import _ from 'lodash' ; type Action = 'track' | 'identify' ; const segmentFunction = ( action ) => window . analytics ? window . analytics [ action ] : _ . noop ; export const analytics = { track : ( event , ... args ) => segmentFunction ( 'track' ) ( event , ... args ) , identify : ( event , ... args ) => segmentFunction ( 'identify' ) ( event , ... args ) } ; const { track , identify } = analytics ; export { track , identify } ;