Juggernaut.Operators.ModeSwap (Juggernaut v0.4.0)

Copy Markdown View Source

Swaps a mode or unit atom argument of a standard-library call for its neighbours in an ordered set (Mutare mode_swap, a reduced set): time units (:second, :millisecond, :microsecond, :nanosecond) in System clocks and conversions, DateTime/NaiveDateTime/Time add, diff, truncate, to_unix, from_unix and utc_now, and :asc↔:desc in Enum.sort/2 and Enum.sort_by/3. At most two replacements per argument (the neighbours).

Not made (Mutare makes them): String case and normalisation modes, ISO 8601 formats, URI encodings, Base and Regex options, shift keys, week starts.