Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
filter by named token
  • Loading branch information
imcotton committed Aug 23, 2023
commit e751bd7720210bf3bf9efb99b462559cf69fe0cc
4 changes: 2 additions & 2 deletions doc/api/util.md
Original file line number Diff line number Diff line change
Expand Up @@ -1522,7 +1522,7 @@ const { values, tokens } = parseArgs({ options, tokens: true });

// Reprocess the option tokens and overwrite the returned values.
const { color, logfile = 'default.log' } = tokens
.filter(({ kind }) => kind === 'option')
.filter((token) => token.kind === 'option')
.reduce((acc, { name, value }) => {

const { [name]: _, ...rest } = acc;
Expand Down Expand Up @@ -1551,7 +1551,7 @@ const { values, tokens } = parseArgs({ options, tokens: true });

// Reprocess the option tokens and overwrite the returned values.
const { color, logfile = 'default.log' } = tokens
.filter(({ kind }) => kind === 'option')
.filter((token) => token.kind === 'option')
.reduce((acc, { name, value }) => {

const { [name]: _, ...rest } = acc;
Expand Down