Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 428 Bytes

README.md

File metadata and controls

27 lines (19 loc) · 428 Bytes

Elm Coder

An encoder and decoder for Base64, Base32 and Base16 (Hexadecimal).

Example

import Base32 exposing (decode, encode)


encodeFooBar =
    ("foobar"
        |> String.toList
        |> List.map Char.toCode
        |> encode
    )
        == Ok "Zm9vYmFy"


decodeFooBar =
    ("Zm9vYmFy"
        |> decode
        |> Result.map (List.map Char.fromCode >> String.fromList)
    )
        == Ok "foobar"