Skip to content

docs: fix filtering example to instantiate format before calling .transform() - #351

Merged
DABH merged 1 commit into
winstonjs:masterfrom
mixelburg:fix/docs-filtering-example
Jun 8, 2026
Merged

DABH merged 1 commit into
winstonjs:masterfrom
mixelburg:fix/docs-filtering-example

Conversation

@mixelburg

Copy link
Copy Markdown
Contributor

Fixes #347.

The "Filtering info Objects" example in the README calls .transform() directly on the format factory (ignorePrivate.transform(…)), but format(fn) returns a factory function — not a format instance. The factory must be called first to create an instance.

Changed both ignorePrivate.transform(…) calls to ignorePrivate().transform(…), consistent with the volume/scream/whisper examples earlier in the same README which correctly instantiate the format with volume({ yell: true }).

@DABH DABH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@DABH
DABH merged commit cac2268 into winstonjs:master Jun 8, 2026
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[docs inconsistancy]: format(fn) documentation suggests .transform is available without instantiation

2 participants