PowerShell Humanizer wraps Humanizer: meets all your .NET needs for manipulating and displaying strings, enums, dates, times, timespans, numbers and quantities
It appears that the ConvertTo-Quantity function is not working as expected
Under the covers ConvertTo-Quantity uses [Humanizer.ToQuantityExtensions]::ToQuantity($string, $quantity, $showQuantityAs)
'widgets'.ToQuantity(1,"Words") returns "one widget"
ConvertTo-Quantity -quantity 1 -string "widgets" -showQuantityAs "Words" returns "Words widget" expected output "one widget"
It appears that the ConvertTo-Quantity function is not working as expected Under the covers ConvertTo-Quantity uses [Humanizer.ToQuantityExtensions]::ToQuantity($string, $quantity, $showQuantityAs)
Calling that directly like: [Humanizer.ToQuantityExtensions]::ToQuantity('widget', 1, 'Words') returns "Words widget" expected output "one widget"
Looks like the parameter processing is messed up somehow.