Named.called: def of ezx@1.11.0.0 Import: import ezx@1.11.0.0/src/ez/named.bend as Named Lines 54-64 of ezx@1.11.0.0/src/ez/named.bend: https://jend.leeeet.dev/read.txt?path=ezx@1.11.0.0/src/ez/named.bend&start_line=54&end_line=64 import Base import ezx@1.11.0.0/src/ez/target.bend as Tgt # the name a source gives itself. A remote is its slug's last component, which # is the repository with any `.git` already off; a path is the last component # of the directory it was resolved to. def called(place: Tgt.Place, +url: String) -> String: match place: case Tgt.Bad{_why}: "" case Tgt.Local{_path}: leaf(url) case Tgt.Remote{_url, slug}: leaf(slug) Uses (3): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/ez/named.bend&name=leaf https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/ez/target.bend&name=Place