A PowerShell module for working with the AST
$script = {
$var = 1
function test-function {
param($string = 'generic message')
Write-Output -InputObject $string
}
function other-function {
test-function -string 'new message'
}
}
$script | Select-AST -Type FunctionDefinitionAst {
$_.Name -like 'other-*'
}
Install from the PSGallery and Import the module
Install-Module Select-Ast
Import-Module Select-Ast
For more information
This project was generated using Kevin Marquette's Full Module Plaster Template.