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

Function frontmatter_status

atomic-cli/src/commands/vault/context.rs:695–702  ·  view source on GitHub ↗
(frontmatter_json: &str)

Source from the content-addressed store, hash-verified

693}
694
695fn frontmatter_status(frontmatter_json: &str) -> Option<String> {
696 let value = serde_json::from_str::<serde_json::Value>(frontmatter_json).ok()?;
697 match value.get("status") {
698 None => Some("active".to_string()),
699 Some(serde_json::Value::String(status)) if !status.is_empty() => Some(status.clone()),
700 Some(_) => None,
701 }
702}
703
704fn frontmatter_name(frontmatter_json: &str) -> Option<String> {
705 frontmatter_string(frontmatter_json, &["name"])

Callers 2

resolve_and_rankFunction · 0.70
is_eligible_memoryFunction · 0.70

Calls 4

getMethod · 0.65
okMethod · 0.45
is_emptyMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected