UNPKG

@dbml/connector

Version:

This package was created to fetch the schema JSON from many kind of databases.

14 lines (11 loc) 313 B
import fs from 'fs'; import path from 'path'; const scanDirNames = (dirname: string, subpath: string): string[] => { const dirPath = path.join(dirname, subpath); const sanitizedDirPath = path.normalize(dirPath); const dirs = fs.readdirSync(sanitizedDirPath); return dirs; }; export { scanDirNames, };