Skip to content

Bloblang minification / alternative to newlines for separating statements #2583

Open
@mihaitodor

Description

@mihaitodor

It would be nice to have an alternative character such as the semicolon for separating Bloblang statements.

Bonus: Have a CLI command which minifies Bloblang code (i.e. replaces newlines with semicolons and trims unnecessary whitespace) without altering raw strings (i.e. """ ... """).

Current workaround (it’s hackish and slow):

let mapping = """
data: |
  root.foo = "bar"
  root.bar = "baz"
""".parse_yaml().data

root = this.bloblang($mapping.replace_all("\\n", "\n"))

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions