Pkg.name.ok: def of ezx@1.11.0.0 Import: import ezx@1.11.0.0/src/pkg/pkg.bend as Pkg Lines 396-401 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=396&end_line=401 import Base # whether a `@` is one the hub rules in, as bend's `NAMED` # pattern reads it def name.ok(+nv: String) -> Bool: +ps = String.split(nv, '@') Bool.and(Nat.is_eq(List.length(&2, String, ps), 2n), Bool.and(name.part(word(ps, 0n)), ver.ok(word(ps, 1n)))) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool 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=List.length https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String 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/pkg.bend&name=name.part https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/pkg/pkg.bend&name=ver.ok https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/pkg/pkg.bend&name=word