import type { exceptMd , file , folder } from "./interfaces" ; export function getAllExceptMd ( allFolders , allFiles ) { const otherFiles = [ ] ; for ( const TAFile of allFiles ) { if ( TAFile . name . slice ( - 3 ) !== '.md' ) { otherFiles . push ( TAFile ) ; } } const foldersAndFiles = makeFolderAndFileObject ( allFolders , otherFiles ) ; return foldersAndFiles ; } export function makeFolderAndFileObject ( folders , otherFiles ) { const foldersAndFiles = { } ; if ( otherFiles . length > 0 ) { Object . assign ( foldersAndFiles , { folders : folders , nonMdFiles : otherFiles , } ) ; } else { Object . assign ( foldersAndFiles , { folders : folders , } ) ; } return foldersAndFiles ; }