MCPcopy Create free account
hub / github.com/ethereum/node-crawler / parseRuntime

Function parseRuntime

frontend/src/data/DataProcessor.ts:138–151  ·  view source on GitHub ↗
(runtime: string, parseOpt: ParseParam)

Source from the content-addressed store, hash-verified

136}
137
138function parseRuntime(runtime: string, parseOpt: ParseParam): Runtime | undefined {
139 const matches = runtime.match(/(?<name>[a-zA-Z]+)?-?(?<version>[\d+.?]+)/);
140 if (matches?.groups) {
141 const name = matches.groups['name']
142 const version = parseVersion(matches.groups['version'], parseOpt)
143 return {
144 ...name && { name },
145 version
146 }
147 }
148
149 parseOpt.errorCallback('runtime', runtime, parseOpt.primaryKey);
150 return undefined;
151}
152
153function parseRaw(raw: string, parseOpt: ParseParam): ClientDetail | undefined {
154 const tokenize = raw.split('/')

Callers 1

parseRawFunction · 0.85

Calls 1

parseVersionFunction · 0.70

Tested by

no test coverage detected