Comments (5)
Hello, this functionality is already available in the latest stencil:
- the
length()
function can be used to count the elements in an array - the array access
[]
operator was added in stencil 0.3.2
from stencil.
I think []
operator works only on objects to access properties, not arrays, i.e. I can't slice arrays or get n-th element.
from stencil.
you are right, I need to check it again. Let me get back to this question at the end of the day.
from stencil.
I have release version 0.3.28
with the following improvements:
- Fixed the array access operator to work on lists (it was working only for Clojure vectors, not for Java lists). The bug also affected the
map
function for nested lists. - Added the
joinAnd
function that supports your use case!
Let me know your thoughts.
from stencil.
It's working, would be great to have range access, like a[0..-1]
but joinAnd
solves currently all the needs 💚
from stencil.
Related Issues (20)
- Round float decimal places in Template HOT 4
- Refreshing Table of Contents after document generation HOT 6
- Can't subtract from result of coalesce expression HOT 2
- Newline character support HOT 4
- Calculating a range between dates HOT 3
- add functions to service on-the-fly HOT 2
- Scaling stencil: support fetching templates from an object storage
- Define local variables in the Tempalte HOT 2
- `map` function doesn't work HOT 2
- Dividing by dynamic value doesn't work HOT 2
- Page breaks HOT 8
- function to insert page break
- Loop over collection with an index HOT 1
- Formatting for integer division breaks in some cases HOT 2
- Sum/Map with conditions HOT 1
- Add support for replaceAll HOT 2
- For loops cause issue with numbered bullet points HOT 5
- Is there a chance for more meaningful errors in Stencil being implemented? HOT 10
- Getting stackoverflow exception during parsing of template regarding whitespace parsing HOT 5
- Allow to set working directory to overwrite usage of system property java.io.tmpdir HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stencil.