MCPcopy Create free account
hub / github.com/TanStack/router / parseMaybeDataJs

Function parseMaybeDataJs

scripts/benchmarks/bundle-size/measure.mjs:244–254  ·  view source on GitHub ↗
(raw)

Source from the content-addressed store, hash-verified

242}
243
244function parseMaybeDataJs(raw) {
245 const trimmed = raw.trim()
246
247 if (trimmed.startsWith('window.BENCHMARK_DATA')) {
248 const sandbox = { window: {} }
249 vm.runInNewContext(trimmed, sandbox, { timeout: 1000 })
250 return sandbox.window.BENCHMARK_DATA
251 }
252
253 return JSON.parse(trimmed)
254}
255
256function resolveManifestChunkKey(manifest, keyOrFile) {
257 if (manifest[keyOrFile]) {

Callers 1

appendHistoryFileFunction · 0.70

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected