MCPcopy Create free account
hub / github.com/Noumena-Network/code / stripRanges

Function stripRanges

scripts/generate_slash_command_appendix.mjs:553–564  ·  view source on GitHub ↗
(source, ranges)

Source from the content-addressed store, hash-verified

551}
552
553function stripRanges(source, ranges) {
554 if (ranges.length === 0) return source
555 let result = ''
556 let cursor = 0
557 for (const range of ranges) {
558 result += source.slice(cursor, range.start)
559 result += '\n'.repeat((source.slice(range.start, range.end).match(/\n/g) ?? []).length)
560 cursor = range.end
561 }
562 result += source.slice(cursor)
563 return result
564}
565
566function parseRegistrationCalls(source, localImportMap, gate = 'always') {
567 const rows = []

Callers 1

collectBundledSkillRowsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected