Skip to content

Commit

Permalink
chore: update index
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Mar 22, 2022
1 parent a4e8c7c commit bd1b397
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.ja.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.ko.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.zh-CN.md

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions questions/7258-medium-objectkeypaths/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!--info-header-start--><h1>ObjectKeyPaths <img src="https://img.shields.io/badge/-medium-d9901a" alt="medium"/> <img src="https://img.shields.io/badge/-%23object--keys-999" alt="#object-keys"/></h1><blockquote><p>by CattChen <a href="https://github.com/ChenKS12138" target="_blank">@ChenKS12138</a></p></blockquote><p><a href="https://tsch.js.org/7258/play" target="_blank"><img src="https://img.shields.io/badge/-Take%20the%20Challenge-3178c6?logo=typescript&logoColor=white" alt="Take the Challenge"/></a> </p><!--info-header-end-->

Get all possible paths that could be called by [_.get](https://lodash.com/docs/4.17.15#get) (a lodash function) to get the value of an object

```typescript
Expand All @@ -8,3 +10,6 @@ type T2 = ObjectKeyPaths<{
}>; // expected to be 'refCount' | 'person' | 'person.name' | 'person.age'
type T3 = ObjectKeyPaths<{ books: [{ name: string; price: number }] }>; // expected to be the superset of 'books' | 'books.0' | 'books[0]' | 'books.[0]' | 'books.0.name' | 'books.0.price' | 'books.length' | 'books.find'
```


<!--info-footer-start--><br><a href="../../README.md" target="_blank"><img src="https://img.shields.io/badge/-Back-grey" alt="Back"/></a> <a href="https://tsch.js.org/7258/answer" target="_blank"><img src="https://img.shields.io/badge/-Share%20your%20Solutions-teal" alt="Share your Solutions"/></a> <a href="https://tsch.js.org/7258/solutions" target="_blank"><img src="https://img.shields.io/badge/-Check%20out%20Solutions-de5a77?logo=awesome-lists&logoColor=white" alt="Check out Solutions"/></a> <!--info-footer-end-->

0 comments on commit bd1b397

Please sign in to comment.