Skip to content

Releases: LinkedInAttic/dustjs-helpers

v1.7.0

18 Apr 00:35
Compare
Choose a tag to compare

Notable Changes

{@select}

New behavior:

  • key is no longer required. If it is not provided, key must be present on individual truth tests inside the select block.
  • type can be attached to the select to apply it to all truth tests inside (and a truth test can override the type)
  • If a provided key is undefined and a type is provided, the undefined value will be cast to type.

{@default}

{@default} has been removed after being deprecated in 1.6.

You can replace {@default} with {@none} in your templates without any change in functionality (but you can have more than one {@none} block, and only one {@default} was allowed.)

{@size}

{@size} will evaluate Dust template strings and provide the size of the result.

Your name has {@size key="{name}" /} letters.

{@math}

{@any} and {@none} now work inside {@math} blocks.

v1.6.3

13 Apr 18:26
Compare
Choose a tag to compare

Notable Changes

  • Fixes truth tests that were used with a context created from dust.makeBase in Dust <= 2.6.2 (most commonly seen if you use Adaro)

v1.6.2

26 Mar 20:55
Compare
Choose a tag to compare

Notable Changes

v1.6.0

05 Mar 19:10
Compare
Choose a tag to compare

The helpers can now be included as an AMD module alongside Dust 2.6.0 or newer.

New helpers:

  • {@any}, which executes if any truth test in a {@select} block passes.
  • {@none}, the opposite
  • {@first}, executes on the first iteration of a loop
  • {@last}... you get the idea

Removed helpers: https://github.com/linkedin/dustjs-helpers/wiki/Deprecated-Features

  • {@if} (use other truth test helpers or context helpers instead)
  • {@idx} (use {$idx}, a Dust core built-in, instead

v1.5.0

11 Dec 07:52
Compare
Choose a tag to compare

v1.4.0

11 Dec 07:53
Compare
Choose a tag to compare
  • #94 Encode opening brackets in contextDump helper (@prashn64)

v1.3.0

11 Dec 07:53
Compare
Choose a tag to compare
  • #89 use peerDependencies instead of dependencies for dustjs-linkedin module (@qraynaud)
  • #88 switched console.log for dust.log (@zaphod1984)
  • #73 Extend the dust.helpers object instead of clobbering. (@kate2753)
  • #77 Fix contextDump test to align with dustjs-linkedin 2.3.x compiler changes (@prashn64)

v1.2.0

21 Feb 01:34
Compare
Choose a tag to compare
  • PR#62 Bump version of dependency dustjs-linkedin to ~2.3.0
  • PR #71 Fixes and improvements to dust.helpers.tap
    • Allows calling dust.helpers.tap on dust body functions
    • Functions in context will now have chunk and context passed in as arguments when called via dust.helpers.tap
    • isFunction flag is now ignored on functions defined in context, as well as, dust body functions