Skip to content

Commit

Permalink
feat: Out-JSON ( Fixes #727 )
Browse files Browse the repository at this point in the history
    Adding Example
  • Loading branch information
StartAutomating authored and StartAutomating committed Mar 9, 2024
1 parent 9cec897 commit 46a70b6
Showing 1 changed file with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

describe 'Template.PipeScript.PipedAssignment' {
it 'Template.PipeScript.PipedAssignment Example 1' {
{
$Collection |=| Where-Object Name -match $Pattern
} | .>PipeScript

# This will become:

$Collection = $Collection | Where-Object Name -match $pattern
}
it 'Template.PipeScript.PipedAssignment Example 2' {
{
$Collection |=| Where-Object Name -match $pattern | Select-Object -ExpandProperty Name
} | .>PipeScript

# This will become

$Collection = $Collection |
Where-Object Name -match $pattern |
Select-Object -ExpandProperty Name
}
}

0 comments on commit 46a70b6

Please sign in to comment.