MCPcopy Create free account
hub / github.com/IIIIQIIII/claude-code / intern

Method intern

src/ink/screen.ts:61–70  ·  view source on GitHub ↗
(hyperlink: string | undefined)

Source from the content-addressed store, hash-verified

59 private stringMap = new Map<string, number>()
60
61 intern(hyperlink: string | undefined): number {
62 if (!hyperlink) return 0
63 let id = this.stringMap.get(hyperlink)
64 if (id === undefined) {
65 id = this.strings.length
66 this.strings.push(hyperlink)
67 this.stringMap.set(hyperlink, id)
68 }
69 return id
70 }
71
72 get(id: number): string | undefined {
73 return id === 0 ? undefined : this.strings[id]

Callers

nothing calls this directly

Calls 2

setMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected