import { ApplyCaseOptions , CaseFunction , PreservedKeysCondition , PreserveSpecificKeys , } from './types' ; export const applyCaseOptions = ( fn , defaultOptions ) => { return ( input , options ? ) : ReturnType < ReturnType < ApplyCaseOptions > > => { return fn ( input , { ... defaultOptions , ... options , } ) ; } ; } ; export const preserveSpecificKeys = ( fn , keys ) => { const condition = typeof keys === 'function' ? keys : ( input ) : boolean => keys . includes ( input ) ; return ( input , options ? ) : ReturnType < ReturnType < PreserveSpecificKeys > > => { return condition ( input , options ) ? input : fn ( input , options ) ; } ; } ;