Skip to content

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

Open
mixelburg wants to merge 1 commit into
winstonjs:masterfrom
mixelburg:fix/docs-filtering-example
Open

docs: fix filtering example to instantiate format before calling .transform()#351
mixelburg wants to merge 1 commit into
winstonjs:masterfrom
mixelburg:fix/docs-filtering-example

Conversation

@mixelburg
Copy link
Copy Markdown

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 }).

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

1 participant