Output.psm1
<#
.SYNOPSIS This function returns the JS code to output a log message to the console. #> function Get-OutputLogMessageCode { param ( # The message to output. [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [String]$message ) return " console.log(`"$($message)`");" } <# .SYNOPSIS This function returns the JS code to output a variable to the console. #> function Get-OutputLogVariableCode { param ( # The variable to output. [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [String]$variable ) return " console.log($($variable));" } <# .SYNOPSIS This function returns the JS code for logging the current URL to the console #> function Get-LogUrlCode { param ( # The comment for the log. [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [String]$comment ) return " logUrl(`"$($comment)`", page.url());" } |