Skip to content
This repository has been archived by the owner on Dec 20, 2023. It is now read-only.

v0.2.1-alpha

Latest
Compare
Choose a tag to compare
@TZ2016 TZ2016 released this 04 Aug 21:25
· 31 commits to dev since this release

Note: This version is not compatible with template schemas for previous versions

  • New syntax for defining arrays in template schema
  • All configured arrays must conform to the format:
    • [ "{{_$config}}", {/*options*/}, <content>, /*optionally*/ <more content...> ]
  • Arrays whose first element is not {{_$config}} are treated as ordinary arrays
    • multiple elements are ok, [ '{{chance.name()}}', '{{chance.age()}}' ]
    • different types are ok [ true, 3, { doc: 'doc' }, [ "array" ]]
  • Supported options:
    • size - can be a number or an array of two numbers ([min, max]). the number of times the contents will be repeated