MCPcopy Create free account
hub / github.com/callstack/agent-device / looksLikeInlineJson

Function looksLikeInlineJson

src/utils/payload-input.ts:4–10  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

2import { AppError } from '../kernel/errors.ts';
3
4function looksLikeInlineJson(value: string): boolean {
5 const trimmed = value.trim();
6 return (
7 (trimmed.startsWith('{') && trimmed.endsWith('}')) ||
8 (trimmed.startsWith('[') && trimmed.endsWith(']'))
9 );
10}
11
12export type ResolvedPayloadInput =
13 | { kind: 'file'; path: string }

Callers 1

resolvePayloadInputFunction · 0.85

Calls 1

startsWithMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…