Ops.module_name: def of near-v-framework@0.4.0.0 Import: import near-v-framework@0.4.0.0/domain/architecture/system/container/ops.bend as Ops Lines 192-198 of near-v-framework@0.4.0.0/domain/architecture/system/container/ops.bend: https://jend.leeeet.dev/read.txt?path=near-v-framework@0.4.0.0/domain/architecture/system/container/ops.bend&start_line=192&end_line=198 import Base # The module a go.mod line requires, or "". def module_name(+line: String) -> String: +words = filled(String.split(String.join(String.split(String.trim(line), '\t'), " "), ' ')) +first = nth(words, 0n) +second = nth(words, 1n) Bool.pick(String, String.eq(first, "require") && String.starts_with(nth(words, 2n), "v"), second, Bool.pick(String, String.starts_with(second, "v") && Bool.not(String.eq(first, "module")), first, "")) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick 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.eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.join https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.split https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.starts_with https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.trim https://jend.leeeet.dev/definition.txt?path=near-v-framework@0.4.0.0/domain/architecture/system/container/ops.bend&name=filled https://jend.leeeet.dev/definition.txt?path=near-v-framework@0.4.0.0/domain/architecture/system/container/ops.bend&name=nth