MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / first_inspector_id

Function first_inspector_id

packages/server/src/devtools.rs:1870–1881  ·  view source on GitHub ↗
(hierarchy: &Value)

Source from the content-addressed store, hash-verified

1868}
1869
1870fn first_inspector_id(hierarchy: &Value) -> Option<String> {
1871 hierarchy
1872 .get("roots")
1873 .and_then(Value::as_array)
1874 .and_then(|roots| roots.first())
1875 .and_then(|root| {
1876 root.get("inspectorId")
1877 .or_else(|| root.get("id"))
1878 .and_then(Value::as_str)
1879 })
1880 .map(ToOwned::to_owned)
1881}
1882
1883fn node_name(node: &Value) -> String {
1884 string_value(node, "type")

Callers 1

runtime_evaluateFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected