MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / string

Function string

atomic-cli/src/commands/diagnostics/collect.rs:1117–1126  ·  view source on GitHub ↗
(value: Option<&Value>)

Source from the content-addressed store, hash-verified

1115 Value::String(name.to_string())
1116 }
1117 fn string(value: Option<&Value>) -> Result<Option<String>, ()> {
1118 match value {
1119 None | Some(Value::Null) => Ok(None),
1120 Some(Value::String(value)) if value.trim().is_empty() => Ok(None),
1121 Some(Value::String(value)) if !value.chars().any(char::is_control) => {
1122 Ok(Some(value.trim().to_string()))
1123 }
1124 _ => Err(()),
1125 }
1126 }
1127 let incomplete = || SkillMetadata {
1128 version: None,
1129 updated_at: None,

Callers 1

frontmatter_metadataFunction · 0.85

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected