Skip to content

v3.3.0

Choose a tag to compare

@LebCit LebCit released this 19 Jul 20:52
· 73 commits to main since this release

New Features

  • Enhanced resolveValue to support nested properties with dot notation.
  • Updated evaluateCondition to handle logical operators and simple conditions.
  • Refactored evaluateSimpleExpression and evaluateComparison for accurate condition evaluations.
  • Added fileBaseName property to parseFrontmatter return object.

Details

This release introduces several improvements and new features to enhance the functionality and flexibility of the template engine and frontmatter parsing.

Changes

  1. Enhance resolveValue to support nested properties with dot notation

    • Updated the resolveValue function to handle nested keys using dot notation.
    • Ensured proper value resolution from data objects for nested properties.
  2. Update evaluateCondition to handle logical operators and simple conditions

    • Modified evaluateCondition to distinguish between logical expressions and simple truthy checks.
    • Integrated resolveValue for simple condition evaluations.
  3. Refactor evaluateSimpleExpression and evaluateComparison for accurate condition evaluations

    • Enhanced evaluateSimpleExpression to evaluate conditions with logical operators.
    • Updated evaluateComparison to perform comparisons using resolved values.
    • Ensured consistent and correct evaluation of expressions.
  4. Add fileBaseName property to parseFrontmatter return object

    • Added fileBaseName to the returned object from the parseFrontmatter function.
    • This property contains the base name of the file without its extension.

This release brings significant enhancements to the way nested properties and logical conditions expressions are evaluated in the template engine (see docs), as well as improvements to the frontmatter parsing functionality. As always, your feedback and contributions are most welcome. Thank you for using LiteNode!