UNPKG

ice.fo.utils

Version:

13 lines (8 loc) 280 B
import path from 'path'; import glob from 'glob'; import normalizePath from './normalizePath'; export default function scanSubdirectories(dir, recursive = false) { dir = normalizePath(dir); const dirs = glob.sync(path.join(dir, '*/')).map(normalizePath); return dirs; }