Skip to content

Commit

Permalink
main
Browse files Browse the repository at this point in the history
  • Loading branch information
sharpchen committed Dec 9, 2024
1 parent 62a3b2f commit 180e5c7
Show file tree
Hide file tree
Showing 45 changed files with 11 additions and 4 deletions.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
# Select

`Select-Object` is a combination of `Select`, `Take`, `TakeLast` in dotnet LINQ.
It can be appiled on singular object and any collection.
## Overview

- Picking composed object by one or more properties with `-Property`.
- select properties reversely by `-ExcludeProperty`.
- Picking single property value with `-ExpandProperty`.
- Take a count from start or end with `-First` or `-Last`.
- Skip a count from start or end `-Skip` or `-SkipLast`.
- Cherry-Pick one or more items by zero-based index.
- Distinct items selected from pipline.

> [!TIP]
> Use `select` alias for `Select-Object`.
Expand Down Expand Up @@ -157,7 +164,7 @@ gps | select -SkipLast 5
## Cherry Pick

```ps1
$dir = ls -Directory
$dir = gci -Directory
$dir | select -Index 1, ($dir.Length - 1) # Pick first and last item
```

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/services/DocumentService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const documentMap = {
Nix: { icon: '❄', description: 'Reproduce freedom' },
'Entity Framework Core': { icon: '🗿', description: '' },
'HTML & CSS': { icon: '😬', description: '' },
Powershell: { icon: '🐚', description: '...' },
PowerShell: { icon: '🐚', description: 'The first strongly-typed shell! Not bad.' },
} as const satisfies DocumentInfo;

export type DocumentName = keyof typeof documentMap;
Expand Down

0 comments on commit 180e5c7

Please sign in to comment.