mirror of
https://github.com/pnpm/pnpm.git
synced 2026-01-03 12:38:15 -05:00
9 lines
249 B
TypeScript
9 lines
249 B
TypeScript
import fs from 'fs'
|
|
import path from 'path'
|
|
|
|
export function existsInDir (entityName: string, dir: string): string | undefined {
|
|
const entityPath = path.join(dir, entityName)
|
|
if (fs.existsSync(entityPath)) return entityPath
|
|
return undefined
|
|
}
|