MCPcopy
hub / github.com/prisma/prisma / parse

Function parse

helpers/compile/plugins/fill-plugin/fillers/path.ts:9–14  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

7}
8
9export function parse(path: string) {
10 const base = basename(path)
11 const dir = dirname(path)
12 const [name, ext] = base.split('.')
13 return { root: '/', dir, base, ext, name }
14}
15
16export function basename(path: string) {
17 const parts = path.split('/')

Callers 2

generateTestClientFunction · 0.85
conversion.test.tsFile · 0.85

Calls 2

basenameFunction · 0.85
dirnameFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…