MCPcopy Index your code
hub / github.com/labring/FastGPT / lineOf

Function lineOf

document/script/checkDocRefs.js:112–114  ·  view source on GitHub ↗
(content, index)

Source from the content-addressed store, hash-verified

110}
111
112function lineOf(content, index) {
113 return content.slice(0, index).split('\n').length;
114}
115
116function isValidRef(url, mdxPath) {
117 if (isExternal(url)) return { ok: true };

Callers 1

mainFunction · 0.85

Calls 2

splitMethod · 0.45
sliceMethod · 0.45

Tested by

no test coverage detected