MCPcopy
hub / github.com/prisma/prisma / getDirectories

Function getDirectories

scripts/graph-dependencies.ts:5–13  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

3import { join } from 'path'
4
5const getDirectories = (path: string) => {
6 const packages = readdirSync(path).filter((any) => statSync(join(path, any)).isDirectory())
7 const result = packages.map((pkg) => ({
8 dirName: pkg,
9 path: join('..', path, pkg),
10 jsonPath: join('..', path, pkg, './package.json'),
11 }))
12 return result
13}
14
15const getKeys = (obj: any, name) => {
16 if (obj && obj[name]) {

Callers 1

mainFunction · 0.85

Calls 3

readdirSyncFunction · 0.90
statSyncFunction · 0.90
joinFunction · 0.90

Tested by

no test coverage detected