Skip to main content

parse_bool

Function parse_bool 

Source
pub fn parse_bool(s: &str) -> Option<bool>
Expand description

Parse a .npmrc-style boolean. npm/pnpm accept true/false and the shell-style "1" / "0". Anything else returns None so the caller’s default takes over.

Public so aube-registry and any other crate that hand-parses .npmrc scalar values can share the same accept-set — a future tweak (e.g. accepting yes/no) lands in one place.