Skip to content

Commit add4def

Browse files
authored
Update comments for custom decode functions
Clarify behavior of custom decode functions in comments.
1 parent 83d193b commit add4def

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ export interface ParseOptions {
8787
*
8888
* The default function is the global `decodeURIComponent`, wrapped in a `try..catch`. If an error
8989
* is thrown it will return the cookie's original value. If you provide your own encode/decode
90-
* scheme you must ensure errors are appropriately handled.
91-
* Returning `undefined` will skip the value so a later duplicate can be used.
90+
* scheme you must ensure errors are appropriately handled. Custom decode functions can return `undefined`,
91+
* which will skip the cookie during `parse` and try again with a future cookie of the same name.
9292
*
9393
* @default decode
9494
*/

0 commit comments

Comments
 (0)