MCPcopy
hub / github.com/PostHog/posthog / toString

Method toString

plugin-server/src/utils/utils.ts:143–170  ·  view source on GitHub ↗

* Convert to string format of the form: * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

()

Source from the content-addressed store, hash-verified

141 * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
142 */
143 toString(): string {
144 // Adapted from https://github.com/uuidjs/uuid/blob/master/src/stringify.js
145 // Note: Be careful editing this code! It's been tuned for performance and works in ways you may not expect.
146 // See https://github.com/uuidjs/uuid/pull/434
147 const arr = this.array
148 return (
149 byteToHex[arr[0]] +
150 byteToHex[arr[1]] +
151 byteToHex[arr[2]] +
152 byteToHex[arr[3]] +
153 '-' +
154 byteToHex[arr[4]] +
155 byteToHex[arr[5]] +
156 '-' +
157 byteToHex[arr[6]] +
158 byteToHex[arr[7]] +
159 '-' +
160 byteToHex[arr[8]] +
161 byteToHex[arr[9]] +
162 '-' +
163 byteToHex[arr[10]] +
164 byteToHex[arr[11]] +
165 byteToHex[arr[12]] +
166 byteToHex[arr[13]] +
167 byteToHex[arr[14]] +
168 byteToHex[arr[15]]
169 ).toLowerCase()
170 }
171}
172
173/**

Callers 15

PageButtonFunction · 0.80
formatBreakdownLabelFunction · 0.80
InsightsTableFunction · 0.80
PathCleaningFilterFunction · 0.80
TestAccountFilterFunction · 0.80
onFilterChangeFunction · 0.80
BreakdownFilterFunction · 0.80
InsightTooltipFunction · 0.80
GroupFunction · 0.80
GroupsFunction · 0.80
GroupActorHeaderFunction · 0.80

Calls

no outgoing calls

Tested by 12

randomStringFunction · 0.64
fixtureInsightResponseFunction · 0.64
ingestEventFunction · 0.64
createEventFunction · 0.64
createPersonFunction · 0.64
randomStringFunction · 0.64
ingestEventFunction · 0.64
createPersonFunction · 0.64
captureFunction · 0.64
runProcessEventFunction · 0.64