MCPcopy Index your code
hub / github.com/NativeScript/SimDeck / node_name

Function node_name

packages/server/src/devtools.rs:1883–1892  ·  view source on GitHub ↗
(node: &Value)

Source from the content-addressed store, hash-verified

1881}
1882
1883fn node_name(node: &Value) -> String {
1884 string_value(node, "type")
1885 .or_else(|| string_value(node, "className"))
1886 .or_else(|| string_value(node, "source"))
1887 .unwrap_or_else(|| "view".to_owned())
1888 .replace(
1889 |character: char| !character.is_ascii_alphanumeric() && character != '-',
1890 "-",
1891 )
1892}
1893
1894fn node_description(node: &Value) -> String {
1895 let name = node_name(node);

Callers 2

node_valueMethod · 0.85
node_descriptionFunction · 0.85

Calls 2

string_valueFunction · 0.70
replaceMethod · 0.65

Tested by

no test coverage detected