Pkg.named.of: def of ezx@1.11.0.0 Import: import ezx@1.11.0.0/src/pkg/pkg.bend as Pkg Lines 411-417 of ezx@1.11.0.0/src/pkg/pkg.bend: https://jend.leeeet.dev/read.txt?path=ezx@1.11.0.0/src/pkg/pkg.bend&start_line=411&end_line=417 import Base import ezx@1.11.0.0/src/pkg/path.bend as P # the `@` an import names, or "" when it names none: the first # component of its normalised path, when that holds an `@` and a `/` follows # it, as bend's loader reads it def named.of(+spec: String) -> String: +n = P.norm(spec) +first = word(String.split(n, '/'), 0n) named.pick(Bool.and(String.contains(n, "/"), String.contains(first, "@")), first) Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.contains https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.split https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/pkg/path.bend&name=norm https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/pkg/pkg.bend&name=named.pick https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/pkg/pkg.bend&name=word