mirror of
https://github.com/toss/es-toolkit.git
synced 2024-11-30 18:23:22 +03:00
docs(minBy): Fix example in minBy
(#141)
change the returns : { a : 3 } to { a : 1 }
This commit is contained in:
parent
2ce004c91b
commit
6f60b786d5
@ -22,6 +22,6 @@ The element with the minimum value as determined by the `getValue` function.
|
|||||||
### Example
|
### Example
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
minBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // Returns: { a: 3 }
|
minBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // Returns: { a: 1 }
|
||||||
minBy([], x => x.a); // Returns: undefined
|
minBy([], x => x.a); // Returns: undefined
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user