import nfzf from 'node-fzf' ; type fzfResult = { selected : { value : string ; index : number ; } ; query : string ; } ; const fuzzyProcess = ( fn , items ) => { nfzf ( items , ( result ) => { const { selected , query } = result ; if ( ! selected ) { console . log ( 'No matches for:' , query ) ; } else { fn ( selected . value ) ; } } ) ; } ; export { fuzzyProcess } ;