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 "array" bloblang method #2538

Closed
wants to merge 4 commits into from
Closed

Add "array" bloblang method #2538

wants to merge 4 commits into from

Conversation

gramian
Copy link
Contributor

@gramian gramian commented Apr 23, 2024

These changes add an array type coercion bloblang method similar to the bytes method: If the caller is already of type array the input is returned. If it is any other type the input is wrapped into a one-element array. Such a method helps to avoid constructs like this.with("name").values().flatten() to ensure an array returned.

  • added passing tests
  • format passing style
  • added docs entry

Feedback welcome

@gramian gramian marked this pull request as ready for review April 23, 2024 22:00
@gramian gramian requested a review from Jeffail as a code owner April 23, 2024 22:00
Jeffail and others added 4 commits April 24, 2024 13:56
Signed-off-by: Christian Himpe <christian.himpe@wwu.de>
Signed-off-by: Christian Himpe <christian.himpe@wwu.de>
Signed-off-by: Christian Himpe <christian.himpe@wwu.de>
Signed-off-by: Christian Himpe <christian.himpe@wwu.de>
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.

2 participants