Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for named arguments to sprintf. #1

Merged
merged 5 commits into from
Jul 26, 2019

Conversation

sgomes
Copy link
Contributor

@sgomes sgomes commented Jul 25, 2019

This allows for sprintf usage of the type:

sprintf( '%(a)s %(b)s', { a: 'foo', b: 'bar' } );

While not part of the standard GNU printf feature set, named arguments are supported by several printf implementations, notably Jed's.

@sgomes sgomes force-pushed the add/named-arguments-in-sprintf branch from 7c745c7 to 06f815b Compare July 25, 2019 10:29
@aduth aduth added the enhancement New feature or request label Jul 25, 2019
packages/sprintf/index.js Outdated Show resolved Hide resolved
This allows for sprintf usage of the type:
sprintf( '%(a)s %(b)s', { a: 'foo', b: 'bar' } );

While not part of the standard GNU printf feature set, they are
supported by several printf implementations, notably Jed's.
This will be handled by lerna.
@sgomes sgomes force-pushed the add/named-arguments-in-sprintf branch from 3edcf90 to 4fe8aa0 Compare July 25, 2019 15:35
Copy link
Owner

@aduth aduth left a comment

Choose a reason for hiding this comment

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

Nice one 👍 Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants