import type { SegmentAdjustSettings } from '../../../core/src/types' ; export const mappedCustomEventToken = ( eventName , settings ) => { let result = null ; const tokens = settings ?. customEvents ; if ( tokens ) { result = tokens [ eventName ] ; } return result ; } ; export const extract = < T > ( key , properties , defaultValue = null ) => { let result = defaultValue ; if ( ! properties ) { return result ; } Object . entries ( properties ) . forEach ( ( [ propKey , propValue ] ) => { if ( key . toLowerCase ( ) === propKey . toLowerCase ( ) ) { result = propValue ; } } ) ; return result ; } ;