Skip to content

Commit

Permalink
iteratee
Browse files Browse the repository at this point in the history
  • Loading branch information
raon0211 committed Nov 7, 2024
1 parent b0e98b6 commit 06a2500
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions docs/ja/reference/compat/util/iteratee.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ const func = iteratee('a');
[{ a: 1 }, { a: 2 }, { a: 3 }].map(func) // => [1, 2, 3]

const func = iteratee({ a: 1 });
[{ a: 1 }, { a: 2 }, { a: 3 }].find(iteratee({ a: 1 })) // => { a: 1 }
[{ a: 1 }, { a: 2 }, { a: 3 }].find(func) // => { a: 1 }

const func = iteratee(['a', 1]);
[{ a: 1 }, { a: 2 }, { a: 3 }].find(iteratee(['a', 1])) // => { a: 1 }
[{ a: 1 }, { a: 2 }, { a: 3 }].find(func) // => { a: 1 }
```
4 changes: 2 additions & 2 deletions docs/ko/reference/compat/util/iteratee.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ const func = iteratee('a');
[{ a: 1 }, { a: 2 }, { a: 3 }].map(func) // => [1, 2, 3]

const func = iteratee({ a: 1 });
[{ a: 1 }, { a: 2 }, { a: 3 }].find(iteratee({ a: 1 })) // => { a: 1 }
[{ a: 1 }, { a: 2 }, { a: 3 }].find(func) // => { a: 1 }

const func = iteratee(['a', 1]);
[{ a: 1 }, { a: 2 }, { a: 3 }].find(iteratee(['a', 1])) // => { a: 1 }
[{ a: 1 }, { a: 2 }, { a: 3 }].find(func) // => { a: 1 }
```
4 changes: 2 additions & 2 deletions docs/reference/compat/util/iteratee.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ const func = iteratee('a');
[{ a: 1 }, { a: 2 }, { a: 3 }].map(func) // => [1, 2, 3]

const func = iteratee({ a: 1 });
[{ a: 1 }, { a: 2 }, { a: 3 }].find(iteratee({ a: 1 })) // => { a: 1 }
[{ a: 1 }, { a: 2 }, { a: 3 }].find(func) // => { a: 1 }

const func = iteratee(['a', 1]);
[{ a: 1 }, { a: 2 }, { a: 3 }].find(iteratee(['a', 1])) // => { a: 1 }
[{ a: 1 }, { a: 2 }, { a: 3 }].find(func) // => { a: 1 }
```
4 changes: 2 additions & 2 deletions docs/zh_hans/reference/compat/util/iteratee.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ const func = iteratee('a');
[{ a: 1 }, { a: 2 }, { a: 3 }].map(func) // => [1, 2, 3]

const func = iteratee({ a: 1 });
[{ a: 1 }, { a: 2 }, { a: 3 }].find(iteratee({ a: 1 })) // => { a: 1 }
[{ a: 1 }, { a: 2 }, { a: 3 }].find(func) // => { a: 1 }

const func = iteratee(['a', 1]);
[{ a: 1 }, { a: 2 }, { a: 3 }].find(iteratee(['a', 1])) // => { a: 1 }
[{ a: 1 }, { a: 2 }, { a: 3 }].find(func) // => { a: 1 }
```
8 changes: 4 additions & 4 deletions src/compat/util/iteratee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ export function iteratee<F extends (...args: any[]) => unknown>(func: F): F;
* [{ a: 1 }, { a: 2 }, { a: 3 }].map(func) // => [1, 2, 3]
*
* const func = iteratee({ a: 1 });
* [{ a: 1 }, { a: 2 }, { a: 3 }].find(iteratee({ a: 1 })) // => { a: 1 }
* [{ a: 1 }, { a: 2 }, { a: 3 }].find(func) // => { a: 1 }
*
* const func = iteratee(['a', 1]);
* [{ a: 1 }, { a: 2 }, { a: 3 }].find(iteratee(['a', 1])) // => { a: 1 }
* [{ a: 1 }, { a: 2 }, { a: 3 }].find(func) // => { a: 1 }
*/
export function iteratee(value: symbol | number | string | object): (...args: any[]) => any;

Expand Down Expand Up @@ -73,10 +73,10 @@ export function iteratee(value: symbol | number | string | object): (...args: an
* [{ a: 1 }, { a: 2 }, { a: 3 }].map(func) // => [1, 2, 3]
*
* const func = iteratee({ a: 1 });
* [{ a: 1 }, { a: 2 }, { a: 3 }].find(iteratee({ a: 1 })) // => { a: 1 }
* [{ a: 1 }, { a: 2 }, { a: 3 }].find(func) // => { a: 1 }
*
* const func = iteratee(['a', 1]);
* [{ a: 1 }, { a: 2 }, { a: 3 }].find(iteratee(['a', 1])) // => { a: 1 }
* [{ a: 1 }, { a: 2 }, { a: 3 }].find(func) // => { a: 1 }
*/
export function iteratee(
value?: symbol | number | string | object | null | ((...args: any[]) => unknown)
Expand Down

0 comments on commit 06a2500

Please sign in to comment.