MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / relativeSpecifier

Function relativeSpecifier

packages/node-sdk/scripts/build-dts.mjs:207–217  ·  view source on GitHub ↗
(fromFile, toFile)

Source from the content-addressed store, hash-verified

205}
206
207function relativeSpecifier(fromFile, toFile) {
208 const fromDir = path.dirname(fromFile);
209 const withoutExtension = toFile.slice(0, -'.d.ts'.length);
210 let relative = path.relative(fromDir, withoutExtension).replaceAll(path.sep, '/');
211
212 if (!relative.startsWith('.')) {
213 relative = `./${relative}`;
214 }
215
216 return relative;
217}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected