definy.cbor-variant-tag
- description
- The tag if the map is a tagged value (only one key that starts with #)
- type
Fn(entries: List<@cbor.entry>) -> Union{#none, #some(String)}
- expression
fn(entries$0) => match @core.equal(left: @core.list-length(value: $0), right: 1) { true => match @core.list-get(list: $0, index: 0) { #some(entry$1) => match $1.key { #text(key$2) => match @std.string-starts-with(value: $2, prefix: "#") { true => #some(@core.string-slice(value: $2, start: 1, end: @core.string-length(value: $2))), false => #none }, _ => #none }, #none(_) => #none }, false => #none }
- visibility
- public
definy.cbor-variant-tag (project definy, branch main, snapshot l0VFjJZP174d8CbZWFoujAGTYjgsQu4uTq5uWCZaXgo) id: jtdSDnT8jWI_apOUoRpr22wpZxXemtCstaJLjkECjj8 content hash: IpqwRq2nVbBVSppicMJwO97fx4Fz8R0YgvC5Otqc9EM