6 lines
210 B
JavaScript
6 lines
210 B
JavaScript
import { readdir } from 'fs/promises'
|
|
|
|
export const getChildren = async source =>
|
|
(await readdir(source, { withFileTypes: true }))
|
|
.filter(dirent => dirent.isDirectory())
|
|
.map(dirent => dirent.name)
|