import propose from 'propose' ; export default function didYouMean ( str , dictionary , prepend = 'Did you mean ' , append = '?' ) { const p = propose ( str , dictionary , { threshold : 0.7 , } ) ; if ( p ) { return prepend + JSON . stringify ( p ) + append ; } else { return '' ; } }