Repository navigation
v0.27.0
Changed
- Breaking:
one_oftakes the allowed values as aNonEmptyList(a)instead of aList(a), so an empty allowlist is a type error instead of a panic. Replacedataprep.one_of(["red", "green"], error)withdataprep.one_of(non_empty_list.new("red", ["green"]), error). not_blanktreats a string of Unicode whitespace (the White_Space set thatcollapse_unicode_spacefolds) as blank. Strings of no-break spaces or ideographic spaces (U+3000) used to pass, asstring.trimkeeps them, and strings of the direction marks U+200E and U+200F, which are not whitespace, used to be rejected.
Fixed
full_matchaccepts every pattern that compiles on its own. On Erlang, patterns that start with a verb such as(*UTF)or(*CR), patterns that end inside a\Qquote, and extended-mode patterns that end in a#comment returned a compile error withbyte_index0. When the wrapped pattern still fails to compile, the error'sbyte_indexpoints into the caller's pattern.
Install
gleam add dataprepSee HexDocs for the API
reference.