Skip to content

Commit

Permalink
typespec and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
taylor-redden-papa committed Sep 7, 2023
1 parent 3b38a1d commit 689b7f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/csv.ex
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ defmodule CSV do
length. Defaults to `false`.
* `:unescape_formulas` – When set to `true`, will remove formula escaping
inserted to prevent [CSV Injection](https://owasp.org/www-community/attacks/CSV_Injection).
* `:redact_exception` – When set to `true`, will remove line data from
exception message output. This is to prevent sensitive data leaking in
logs
## Examples
Expand Down Expand Up @@ -148,6 +151,7 @@ defmodule CSV do
| {:validate_row_length, boolean()}
| {:escape_character, char()}
| {:escape_max_lines, integer()}
| {:redact_exception, boolean()}

@spec decode(Enumerable.t(), [decode_options()]) :: Enumerable.t()
def decode(stream, options \\ []) do
Expand Down
1 change: 1 addition & 0 deletions lib/csv/decoding/parser.ex
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ defmodule CSV.Decoding.Parser do
| {:separator, char}
| {:escape_character, char}
| {:field_transform, (String.t() -> String.t())}
| {:redact_exception, boolean()}

@spec parse(Enumerable.t(), [parse_options()]) :: Enumerable.t()
def parse(stream, options \\ []) do
Expand Down

0 comments on commit 689b7f4

Please sign in to comment.