mirror of
https://github.com/benclaussen/NetboxPS.git
synced 2025-12-15 02:35:46 +00:00
✨feature: add function to generate formatted slugs
This commit is contained in:
parent
dccfde55ba
commit
5afd24f531
1 changed files with 16 additions and 0 deletions
16
Functions/Helpers/GenerateSlug.ps1
Normal file
16
Functions/Helpers/GenerateSlug.ps1
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
function GenerateSlug {
|
||||||
|
[CmdletBinding()]
|
||||||
|
[OutputType([string])]
|
||||||
|
param (
|
||||||
|
[Parameter(Mandatory = $true)]
|
||||||
|
[string]$Slug
|
||||||
|
)
|
||||||
|
|
||||||
|
Write-Verbose "Generating slug"
|
||||||
|
|
||||||
|
$Slug = $Slug.Replace("-", "").Replace(" ", "-").ToLower()
|
||||||
|
|
||||||
|
Write-Verbose " Completed building URIBuilder"
|
||||||
|
# Return the entire UriBuilder object
|
||||||
|
$Slug
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue