MCPcopy Create free account
hub / github.com/ChromeDevTools/chrome-devtools-mcp / arrayLength

Function arrayLength

src/formatters/RemoteObjectFormatter.ts:110–113  ·  view source on GitHub ↗
(preview: Protocol.Runtime.ObjectPreview)

Source from the content-addressed store, hash-verified

108}
109
110function arrayLength(preview: Protocol.Runtime.ObjectPreview): number {
111 const match = preview.description?.match(/[[(](\d+)[\])]$/);
112 return match ? Number(match[1]) : 0;
113}
114
115function formatArrayItems(preview: Protocol.Runtime.ObjectPreview): string[] {
116 const length = arrayLength(preview);

Callers 2

formatArrayItemsFunction · 0.85
formatObjectPreviewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected