fluentfixture
ContributionCode of Conduct
  • Fluent Fixture
  • PACKAGES
    • @fluentfixture/core
      • Everything Is A Factory
      • Streams
        • Stream
        • Boolean Stream
        • Number Stream
        • String Stream
        • Date Stream
        • Array Stream
        • Object Stream
      • Generators
      • Live Demo
    • @fluentfixture/format
      • Structure
      • Pipe Functions
        • Built-In Pipes
        • Custom Pipes
      • How To Use
      • Error Handling
      • Live Demo
  • 🫂Contribution
  • 🐦Follow me on Twitter :)
Powered by GitBook
On this page
Edit on GitHub
  1. PACKAGES
  2. @fluentfixture/format

Structure

Syntax

Formatting syntax consists of two parts: ${path:func1()|func2()|...|funcN()}

  • the path is the descriptor of the target property. When the path is empty, the target is the whole source object.

  • the func1() , func2(), and the funcN() are pipe functions.

Expression
Target Property
Pipe Functions

${}

obj

${key}

obj.key

${key:trim()|padLeft(5)}

obj.key

trim() , padLeft(5)

${:trim()|split(",")}

obj

trim() , split(",")

The more information about pipes can be found on Pipe Functions

Previous@fluentfixture/formatNextPipe Functions

Last updated 7 months ago