MCPcopy Index your code
hub / github.com/npmx-dev/npmx.dev / withUserContentPrefix

Function withUserContentPrefix

server/utils/readme.ts:273–275  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

271const USER_CONTENT_PREFIX = 'user-content-'
272
273function withUserContentPrefix(value: string): string {
274 return value.startsWith(USER_CONTENT_PREFIX) ? value : `${USER_CONTENT_PREFIX}${value}`
275}
276
277function toUserContentId(value: string): string {
278 return `${USER_CONTENT_PREFIX}${value}`

Callers 2

toUserContentHashFunction · 0.85
prefixIdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected