We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently there is no way to access array elements ex:
const tpl = require('nano-var-template')() console.log(tpl("Hello {users[0].name}!", {users:[{name: "Jane Doe"}]}))
Proposal
$
\n
console.log(tpl("Hello {users[$].name}!", {users:[{name: "Jane Doe"},{name: "John Doe"}]})) // Hello Jane Done \n John Doe
console.log(tpl("Hello {users[1].name}!", {users:[{name: "Jane Doe"},{name: "John Doe"}]})) // Hello John Doe
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Currently there is no way to access array elements
ex:
Proposal
$
) as index, concat multiple items with\n
or with a configurable optionThe text was updated successfully, but these errors were encountered: