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

Function parseMaybeDataJs

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

Source from the content-addressed store, hash-verified

228}
229
230function parseMaybeDataJs(raw) {
231 const trimmed = raw.trim()
232
233 if (trimmed.startsWith('window.BENCHMARK_DATA')) {
234 const sandbox = { window: {} }
235 vm.runInNewContext(trimmed, sandbox, { timeout: 1000 })
236 return sandbox.window.BENCHMARK_DATA
237 }
238
239 return JSON.parse(trimmed)
240}
241
242function resolveManifestChunkKey(manifest, keyOrFile) {
243 if (manifest[keyOrFile]) {

Callers 1

appendHistoryFileFunction · 0.70

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected