def slug.ok

ezx@1.11.0.0 · src/ez/target.bend:225

import ezx@1.11.0.0/src/ez/target.bend as Target
import Base

225# a slug that stays under the cache: non-empty, relative, and with no `..`
226def slug.ok(+text: String) -> Bool:
227  Bool.and(Bool.not(String.is_empty(text)),
228    Bool.and(Bool.not(String.starts_with(text, "/")),
229      Bool.not(climb(String.split(text, '/')))))

Uses (9)

Used by (2)