FeatureFuel
1

Capture template tag arguments into an options object

Source: Kong/insomnia#5788 · opened by @strokirk
Currently, the TemplateTag.run function gets the Context object as it's first argument, followed by each argument sent to the template tag as a positional parameter.

This is a bit error prone, since you have to remember and make sure that the list of TemplateTag.args is in the same order as the function arguments. Collecting the arguments into a JavaScript object / class with named properties would make it easier to pass them around and interact with them safely.

For backwards compatibility, this should probably be accessed via a method on the Context interface. Maybe something like this?

No pledges yet. Be the first to back this.

Make a pledge

Pledge your monetary support if this feature is added.

$

Comments

No comments yet.

Replying to

Add a comment

What do you think about this feature request?


Similar requests