Skip to content

Provide method of escaping values containing lookup identifiers #14

Description

@mdeltito

This is an edge case (and there are ways around it) but consider the following example of a value that starts with a #:

function myAction(opts) {
  return this.lookup(opts)
}

chain
  .myAction({
    id: '!random'
  , color: '#cccccc' 
  })

A couple of options offhand would be:

  • Introduce a control character to escape e.g. \#foo, \!bar
  • Provide a built-in function that just reflects the value e.g. !literal("#ccc")
    • At minimum this is a viable workaround, since quoted function arguments do not pass through lookup

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions