[{"name":"Curtissimo.Email","comment":" This module provides an email address parsing implementation that complies\nwith\n\n  - [RFC 2822 - Internet Message Format, Section 3.4.1 - **Addr-spec\n    specification**](https://www.rfc-editor.org/rfc/rfc2822#section-3.4.1) (no\n    comment support), and\n  - [RFC 6533 - Internationalized Delivery Status and Disposition\n    Notifications,\n    Section 3 - **UTF-8 Address\n    Type**](https://www.rfc-editor.org/rfc/rfc6533#section-3).\n\nThat's pretty cool, but not quite what most of us want from an email address\nparser because it allows email addresses like `\"this\\@is/\\vgreat\"@[   foo  ]`.\n(I _know_, right?)\n\nSo, the parser is configurable to allow you greater control over the whole weird\nemail address thing.\n\n\n## The anatomy of an email address\n\n**RFC 2822 - Internet Message Format** specifies that an email address has two\nparts:\n\n  - The _local_ part which is the stuff before the `@` symbol\n  - The _domain_ part which is the stuff after the `@` symbol\n\n\n### The _local_ part\n\n**RFC 2822 - Internet Message Format** specifies two different formats for the\nlocal part of an email address:\n\n  - The _dot-atom_ format which is what you are most likely used to, like\n    `firstName.lastName`\n  - The _quoted-string_ format which is the Chaos Monkey of local parts letting\n    you put pretty much anything between two double quotes, like\n    `\"this\\@is/\\vgreat\"`\n\n\n### Plus addressing\n\nMany modern email providers allow you to perform so-called \"plus addressing,\"\nwhere anything after a `+` symbol in the local part is completely ignored\nwhen delivering the email. Thus, the emails `human@example.com` and\n`human+adult@example.com` would deliver to the same mailbox.\n\nThis parser supports the identification of plus addressing. In the terminology\nof this parser, the content before the `+` symbol is the _stem_ and the content\nafter the `+` symbols is the _plus_.\n\n\n### The _domain_ part\n\n**RFC 2822 - Internet Message Format** specifies two different formats for the\ndomain part of an email address:\n\n  - The _dot-atom_ format which is what you are most likely used to, like\n    `example.com`\n  - The _domain-literal_ format which is the Chaos Monkey of domain parts\n    letting you put pretty much anything between square brackets, like\n    `[this         \\bis/\\vgreat\\t]` (bells and vertical tabs, anyone?)\n\n\n## Configuration\n\n@docs ParseOptions, defaultOptions\n\n\n## Use\n\n@docs fromString, toString, validate\n\n\n## Accessors and modifiers\n\n@docs domain, local, plus, stem, removePlus\n\n\n## Opaque types\n\n@docs Email\n\n","unions":[{"name":"Email","comment":" The opaque type representing an email address.\n","args":[],"cases":[]}],"aliases":[{"name":"ParseOptions","comment":" Allows you to allow or prevent types of email parts or content when your\ncode converts a `String` to an [`Email`](#Email).\n\n  - `allowDomainLiterals`: If set to `True`, then the parser will recognize\n    what RFC 2822 refers to as \"domain literals.\" A domain literal starts with\n    a `[`, ends with an `]`, and allows letters, whitespace, and ASCII control\n    characters between the square brackets.\n  - `allowQuotedLocals`: If set to `True`, then the parser will recognize what\n    RFC 2822 refers to as \"quoted strings\" as the local part of the email\n    address. A quoted string starts and ends with `\"` (double quotes), and\n    allows letters, whitespace, and escaped letters between the quotes.\n  - `allowUnicode`: If set to `True`, then the parser will allow Unicode\n    alphanumeric characters in the local part and domain part.\n\n","args":[],"type":"{ allowDomainLiterals : Basics.Bool, allowQuotedLocals : Basics.Bool, allowUnicode : Basics.Bool }"}],"values":[{"name":"defaultOptions","comment":" Provides a [`ParseOptions`](#ParseOptions) with all flags set to `False`\nwhich is pretty sensible.\n","type":"Curtissimo.Email.ParseOptions"},{"name":"domain","comment":" Returns the domain portion of an [`Email`](#Email).\n\n    \"person+adult@example.org\"\n        |> fromString defaultOptions\n        |> Result.map domain\n    --> Ok \"example.org\"\n\n","type":"Curtissimo.Email.Email -> String.String"},{"name":"fromString","comment":" Converts a `String` to an [`Email`](#Email) using the provided\n[`ParseOptions`](#ParseOptions).\n\nIf the input is invalid, returns a list of columnar positions where the parser\nfailed to recognize the input.\n\n","type":"Curtissimo.Email.ParseOptions -> String.String -> Result.Result (List.List Basics.Int) Curtissimo.Email.Email"},{"name":"local","comment":" Returns the local portion of an [`Email`](#Email).\n\n    \"person+adult@example.org\"\n        |> fromString defaultOptions\n        |> Result.map local\n    --> Ok \"person+adult\"\n\n","type":"Curtissimo.Email.Email -> String.String"},{"name":"plus","comment":" Returns the plus portion of an [`Email`](#Email).\n\n    \"person+adult@example.org\"\n        |> fromString defaultOptions\n        |> Result.map plus\n    --> Ok (Just \"adult\")\n\n    \"person@example.org\"\n        |> fromString defaultOptions\n        |> Result.map plus\n    --> Ok Nothing\n\n","type":"Curtissimo.Email.Email -> Maybe.Maybe String.String"},{"name":"removePlus","comment":" Returns an [`Email`](#Email) with the _plus_ portion removed.\n\n    \"person+adult@example.org\"\n        |> fromString defaultOptions\n        |> Result.map removePlus\n        |> Result.map toString\n    --> Ok \"person@example.org\"\n\n","type":"Curtissimo.Email.Email -> Curtissimo.Email.Email"},{"name":"stem","comment":" Returns the stem portion of an [`Email`](#Email).\n\n    \"person+adult@example.org\"\n        |> fromString defaultOptions\n        |> Result.map stem\n    --> Ok \"person\"\n\n","type":"Curtissimo.Email.Email -> String.String"},{"name":"toString","comment":" Converts an [`Email`](#Email) to a `String`.\n\n    \"person+adult@example.org\"\n        |> fromString defaultOptions\n        |> Result.map toString\n    --> Ok \"person+adult@example.org\"\n\n","type":"Curtissimo.Email.Email -> String.String"},{"name":"validate","comment":" A convenience function to validate an email address.\n\nReturns the email address if it's valid. Returns `Nothing` otherwise.\n\n    \"person+adult@example.org\"\n        |> validate defaultOptions\n    --> Just \"person+adult@example.org\"\n\n    \"person@adult@example.org\"\n        |> validate defaultOptions\n    --> Nothing\n\n","type":"Curtissimo.Email.ParseOptions -> String.String -> Maybe.Maybe String.String"}],"binops":[]}]