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

Function links

atomic-repository/src/repository/vault_projection.rs:632–644  ·  view source on GitHub ↗
(fm: &'a serde_json::Value, field: &str)

Source from the content-addressed store, hash-verified

630}
631
632fn links<'a>(fm: &'a serde_json::Value, field: &str) -> Vec<&'a str> {
633 match fm.get(field) {
634 Some(serde_json::Value::Array(values)) => {
635 values.iter().filter_map(|v| v.as_str()).collect()
636 }
637 Some(serde_json::Value::String(value)) => value
638 .split(',')
639 .map(str::trim)
640 .filter(|s| !s.is_empty())
641 .collect(),
642 _ => Vec::new(),
643 }
644}

Callers 1

extractMethod · 0.85

Calls 5

getMethod · 0.65
collectMethod · 0.45
iterMethod · 0.45
as_strMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected