MCPcopy
hub / github.com/drizzle-team/drizzle-orm / parse

Function parse

drizzle-kit/src/loader.mjs:5–14  ·  view source on GitHub ↗
(it)

Source from the content-addressed store, hash-verified

3import * as path from 'path';
4
5const parse = (it) => {
6 if (!it) return { drizzle: false };
7
8 if (it.endsWith('__drizzle__')) {
9 const offset = it.startsWith('file://') ? 'file://'.length : 0;
10 const clean = it.slice(offset, -'__drizzle__'.length);
11 return { drizzle: true, clean, original: it };
12 }
13 return { drizzle: false, clean: it };
14};
15
16export function resolve(specifier, context, nextResolve) {
17 const { drizzle, clean } = parse(specifier);

Callers 8

fix-imports.tsFile · 0.85
fix-imports.tsFile · 0.85
fix-imports.tsFile · 0.85
fix-imports.tsFile · 0.85
fix-imports.tsFile · 0.85
normaliseSQLiteUrlFunction · 0.85
resolveFunction · 0.85
loadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected