MCPcopy Create free account
hub / github.com/ccusage/ccusage / object_field

Function object_field

rust/crates/ccusage/src/adapter/codebuff/parser.rs:447–452  ·  view source on GitHub ↗
(
    record: &'a serde_json::Map<String, Value>,
    key: &str,
)

Source from the content-addressed store, hash-verified

445}
446
447fn object_field<'a>(
448 record: &'a serde_json::Map<String, Value>,
449 key: &str,
450) -> Option<&'a serde_json::Map<String, Value>> {
451 record.get(key).and_then(Value::as_object)
452}
453
454fn string_field(record: &serde_json::Map<String, Value>, key: &str) -> Option<String> {
455 let value = record.get(key)?.as_str()?.trim();

Callers 4

extract_assistant_usageFunction · 0.70
message_timestampFunction · 0.70
pick_nested_u64Function · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected