import { isUndefined } from 'lodash' ; const formatPathWithDots = ( value ) : string => { return `"${ value . replace ( /\./g , '\\.' ) }"` ; } ; const getJMESPathForValuesSchema = ( value , currentPath ? ) : string => { const name = value . includes ( '.' ) ? formatPathWithDots ( value ) : value ; return isUndefined ( currentPath ) ? value : `${ currentPath }.${ name }` ; } ; export default getJMESPathForValuesSchema ;