handlebars-lang / handlebars-lang/handlebars.js

Passing Arrays or Objects to Helpers

Open
#1,455 6 comments 2 reactions 0 assignees View on GitHub
feature
Dominant language
JavaScript
Stars
18.7k
Forks
2.1k
PR merge metrics
No merged PRs in 30d

Description

In addition to passing strings, numbers, and boolean values, could it be possible to pass arrays or objects to helpers? For example:
```handlebars
{{helper_function "abc" 10 ["a","b","c"] ["d","e","f"] {"a":1,"b":2,"c":3} true}}
```

Contributor guide

Open the contributing guide

Research direction

The issue gives a Handlebars example but names no files or tests. Begin by locating helper argument parsing and the existing tests for scalar arguments; done means arrays and objects can be passed alongside strings, numbers, and booleans as shown.

Written by the indexing model from the issue text.

Assessment

Tech stack
handlebars, javascript
Domain
web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.