MCPcopy Create free account
hub / github.com/thetarnav/solid-devtools / splitOnColon

Function splitOnColon

packages/shared/src/utils.ts:155–161  ·  view source on GitHub ↗
(
    str: T,
)

Source from the content-addressed store, hash-verified

153}
154
155export const splitOnColon = <T extends string>(
156 str: T,
157): T extends `${infer L}:${infer R}` ? [L, R] : [T, null] => {
158 const splitIndex = str.indexOf(':')
159 if (splitIndex === -1) return [str, null] as any
160 return [str.slice(0, splitIndex), str.slice(splitIndex + 1)] as any
161}
162
163export function whileArray<T, U>(
164 toCheck: T[],

Callers 3

decodeFunction · 0.90
updateStoreFunction · 0.90
getValueItemFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…