/**
 * Get example list from extracted folder
 */ import { lstatSync , existsSync , readdirSync } from 'fs' ; const exists = ( path ) => existsSync ( path ) ; const isDotFile = ( name ) => name . startsWith ( '.' ) ; const isDirectory = ( path ) => lstatSync ( path ) . isDirectory ( ) ; export function summary ( source ) { if ( ! exists ( source ) || ! isDirectory ( source ) ) { return [ ] ; } return readdirSync ( source , { withFileTypes : true } ) . filter ( d => ! isDotFile ( d . name ) ) . filter ( d => d . isDirectory ( ) ) . map ( d => d . name ) ; }