Skip to content

Commit

Permalink
feat: Emoji.GetPagingParameters ( Fixes #32 )
Browse files Browse the repository at this point in the history
  • Loading branch information
StartAutomating authored and StartAutomating committed Feb 21, 2024
1 parent ea58c18 commit f2a092a
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions Types/Emoji/Get.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,9 @@ if ($Number) {
$allNamedEmoji = $allNamedEmoji | Where-Object Number -In $Number
}

$selectSplat = @{}
if (
($PSCmdlet.PagingParameters.Skip -as [int]) -or
($PSCmdlet.PagingParameters.First -as [int])
) {
if ($PSCmdlet.PagingParameters.Skip) {
$selectSplat.Skip = $PSCmdlet.PagingParameters.Skip
}

if ($PSCmdlet.PagingParameters.First) {
$selectSplat.First = $PSCmdlet.PagingParameters.First
}
}

$selectSplat = $Emoji.GetPagingParameters($PSCmdlet.PagingParameters)
if ($name -or $number) {
if ($selectSplat.Count) {
if ($selectSplat.Count -gt 1) {
$allNamedEmoji | Select-Object @selectSplat
} else {
$allNamedEmoji
Expand Down

0 comments on commit f2a092a

Please sign in to comment.