Endo API documentation
    Preparing search index...

    Function qp

    • qp for quote passable as a quasi-quoted Justin expression.

      Both q from @endo/errors and this qp from @endo/marshal can be used together with Fail, X, etc from @endo/errors to mark a substitution value to be both

      • visually quoted in some useful manner
      • unredacted

      Differences:

      • given a pattern M.and(M.gte(-100), M.lte(100)),
        `${q(patt)}`
        
        produces "[match:and]", whereas
        `${qp(patt)}`
        
        produces quasi-quotes Justin of what would be passed:
        `makeTagged("match:and", [
        makeTagged("match:gte", -100),
        makeTagged("match:lte", 100),
        ])`
      • q is lazy, minimizing the cost for using it in an error that's never logged. Unfortunately, due to layering constraints, qp is not lazy, always rendering to quasi-quoted Justin immediately.

      Since Justin is a subset of HardenedJS, neither the name qp nor the rendered form need to make clear that the rendered form is in Justin rather than HardenedJS.

      Parameters

      Returns StringablePayload