logdna / logdna/setup-chain-node

Provide method of escaping values containing `lookup` identifiers

Open
#14 5 comments 0 reactions 1 assignee View on GitHub

@mdeltito is already working on this.

Since Jun 18, 2021.

enhancement good first issue help wanted
Dominant language
JavaScript
Stars
3
Forks
0
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.