Skip to content

Commit

Permalink
Fix documentation for NormalizeValue
Browse files Browse the repository at this point in the history
  • Loading branch information
octet-stream committed Mar 12, 2024
1 parent f26ee28 commit c4b749b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/mean-pumpkins-hug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@octetstream/object-to-form-data": patch
---

Fix documentation for NormalizeValue
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,11 @@ Serialization options
| notation | `"dot" \| "bracket"` | false | `"bracket"` | Type of the nested fields notation. Can be either `"dot"` or `"bracket"` |
| normalizeValue | [`NormalizeValue`](#type-normalizevalue) | false | `undefined` | Value normalizer. This function will be called on each *scalar* value, before it's added to FormData instance |

### `type NormalizeValue`
### `interface NormalizeValue`

Value normalizer.

Will be called on each *scalar* value, before it's added to FormData instance. It **must** return either `Blob` or `string`
A function to be called on each *scalar* value, before it's added to FormData instance. It **must** return either `Blob` or `string`

This function will be called with the following arguments:

Expand Down

0 comments on commit c4b749b

Please sign in to comment.