premasagar / tim

A tiny, secure JavaScript micro-templating script.
251 stars 26 forks source link

Enhancement (tinytim.js): Added function capability ( controlled ) #22

Open masterbee opened 8 years ago

masterbee commented 8 years ago

Modulus ( any digit can be used after @mod )

{{@mod 4}}
.... some markup which will be seen every 4 times ( if index is passed )
{{@endmod}} 

Even

{{@even}}
.... some markup on every even number of the index
{{@endeven}} 

Odd

{{@odd}}
.... some markup on every even number of the index
{{@endodd}} 

Just sharing incase you were interested in incorporating it. Again great work @premasagar on the original function

masterbee commented 8 years ago

@premasagar - just chiming in to see if this Pull Request still interests you? I am doing a bit of housekeeping on the repos I have and wanted to know if it was safe to disregard this P.R since there is no interest.

premasagar commented 7 years ago

@masterbee thanks a lot for this pull request. I like the enhancements. I don't use tim any more, and so I am reluctant to merge in new functionality.

There's no need to delete the PR. It may be useful to someone, and maybe it should be merged, either by me or someone who wants to collaborate ?