let arr = [[LIST_WITH_FILE_CONTENT]]; arr = arr.filter(({length}) => length); [[LIST_WITH_FILE_CONTENT]]=arr;