diff --git a/docs/ja/reference/array/maxBy.md b/docs/ja/reference/array/maxBy.md index 8f94c908..fac90353 100644 --- a/docs/ja/reference/array/maxBy.md +++ b/docs/ja/reference/array/maxBy.md @@ -19,7 +19,7 @@ function maxBy(items: T[], getValue: (element: T) => number): T; (`T`): `getValue`関数を基準に、配列の中で最大値を持つ要素。配列が空の場合は`undefined`を返します。 -### 例 +## 例 ```typescript maxBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // 戻り値: { a: 3 } diff --git a/docs/ja/reference/array/minBy.md b/docs/ja/reference/array/minBy.md index 9e1ccb86..e19f25c9 100644 --- a/docs/ja/reference/array/minBy.md +++ b/docs/ja/reference/array/minBy.md @@ -17,7 +17,7 @@ function minBy(items: T[], getValue: (element: T) => number): T; (`T`): `getValue` 関数を基準に、配列から最小値を持つ要素。 -### 例 +## 例 ```typescript minBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // 戻り値: { a: 1 } diff --git a/docs/ja/reference/compat/array/indexOf.md b/docs/ja/reference/compat/array/indexOf.md index 72f7f44b..a7614fca 100644 --- a/docs/ja/reference/compat/array/indexOf.md +++ b/docs/ja/reference/compat/array/indexOf.md @@ -27,7 +27,7 @@ function indexOf(array: T[] | null | undefined, searchElement: T, fromIndex?: (`number`): 配列内で指定された値と最初に一致する要素のインデックス。一致する要素が見つからない場合は `-1` を返します。 -### 例 +## 例 ```typescript const array = [1, 2, 3, NaN]; diff --git a/docs/ja/reference/compat/object/get.md b/docs/ja/reference/compat/object/get.md index cb0d7e91..94d06327 100644 --- a/docs/ja/reference/compat/object/get.md +++ b/docs/ja/reference/compat/object/get.md @@ -95,7 +95,7 @@ function get(object: unknown, path: PropertyKey | readonly PropertyKey[], defaul (`Get`): 見つかった値。 -### 例 +## 例 ```typescript import { get } from 'es-toolkit/compat'; diff --git a/docs/ja/reference/compat/object/property.md b/docs/ja/reference/compat/object/property.md index f9562565..6f884a78 100644 --- a/docs/ja/reference/compat/object/property.md +++ b/docs/ja/reference/compat/object/property.md @@ -22,7 +22,7 @@ function property(path: PropertyKey | readonly PropertyKey[]): (object: unknown) (`(object: unknown) => any`): オブジェクトの指定されたパスにある値を取得する関数。 -### 例 +## 例 ```typescript import { property } from 'es-toolkit/compat'; diff --git a/docs/ja/reference/compat/predicate/isMatch.md b/docs/ja/reference/compat/predicate/isMatch.md index 7dc7b82c..d16d761f 100644 --- a/docs/ja/reference/compat/predicate/isMatch.md +++ b/docs/ja/reference/compat/predicate/isMatch.md @@ -14,14 +14,14 @@ function isMatch(target: unknown, source: unknown): boolean; ``` -## パラメータ +### パラメータ - `target` (`unknown`): 形状と値が一致するかどうかを確認する値。 - `source` (`unknown`): 確認する形状と値を持つオブジェクト。 -## 戻り値 +### 戻り値 -- (`boolean`): `target` が `source` の形状と値に一致する場合は `true`。そうでない場合は `false`。 +(`boolean`): `target` が `source` の形状と値に一致する場合は `true`。そうでない場合は `false`。 ## 例 diff --git a/docs/ja/reference/compat/predicate/matchesProperty.md b/docs/ja/reference/compat/predicate/matchesProperty.md index 2024b142..83106eea 100644 --- a/docs/ja/reference/compat/predicate/matchesProperty.md +++ b/docs/ja/reference/compat/predicate/matchesProperty.md @@ -16,14 +16,14 @@ function matchesProperty(property: PropertyKey | PropertyKey[], source: unknown): (target?: unknown) => boolean; ``` -## パラメータ +### パラメータ - `property` (`number | string | symbol | Array`): オブジェクトのプロパティを表すパス。プロパティ名、プロパティ名の配列、または深いパスを表す文字列を使用できます。 - `source` (`unknown`): オブジェクトのプロパティと比較する値。 -## 戻り値 +### 戻り値 -- (`(target: unknown) => boolean`): `target` オブジェクトを受け取り、指定されたプロパティの値を取得し、`source` と一致するかどうかを確認する関数。一致する場合は `true`、そうでない場合は `false` を返します。 +(`(target: unknown) => boolean`): `target` オブジェクトを受け取り、指定されたプロパティの値を取得し、`source` と一致するかどうかを確認する関数。一致する場合は `true`、そうでない場合は `false` を返します。 ## 例 diff --git a/docs/ja/reference/compat/string/padEnd.md b/docs/ja/reference/compat/string/padEnd.md index f0c6e042..73844567 100644 --- a/docs/ja/reference/compat/string/padEnd.md +++ b/docs/ja/reference/compat/string/padEnd.md @@ -16,13 +16,13 @@ function padEnd(str: string, length = 0, chars = ' '): string; ``` -## パラメータ +### パラメータ - `str` (`string`): 長さを拡張する文字列。 - `length` (`number`): 拡張したい長さ。デフォルト値は `0`。 - `char` (`string`): 長さを拡張する際に追加する文字。デフォルト値は `' '`。 -## 戻り値 +### 戻り値 指定された長さまで拡張され、末尾に文字が追加された文字列。 diff --git a/docs/ja/reference/compat/string/padStart.md b/docs/ja/reference/compat/string/padStart.md index 87a9b837..33c0c05d 100644 --- a/docs/ja/reference/compat/string/padStart.md +++ b/docs/ja/reference/compat/string/padStart.md @@ -16,13 +16,13 @@ function padStart(str: string, length = 0, chars = ' '): string; ``` -## パラメータ +### パラメータ - `str` (`string`): 長さを拡張する文字列。 - `length` (`number`): 拡張したい長さ。デフォルト値は `0`。 - `char` (`string`): 長さを拡張する際に追加する文字。デフォルト値は `' '`。 -## 戻り値 +### 戻り値 指定された長さまで拡張され、先頭に文字が追加された文字列。 diff --git a/docs/ja/reference/compat/string/repeat.md b/docs/ja/reference/compat/string/repeat.md index 3a2f2b74..10ea856e 100644 --- a/docs/ja/reference/compat/string/repeat.md +++ b/docs/ja/reference/compat/string/repeat.md @@ -25,7 +25,7 @@ function repeat(str: string, n: number): string; (`string`): `n`回繰り返された文字列。 -## Examples +## 例 ```javascript repeat('abc', 0); // '' diff --git a/docs/ja/reference/string/pad.md b/docs/ja/reference/string/pad.md index 5ed0c07c..af10cced 100644 --- a/docs/ja/reference/string/pad.md +++ b/docs/ja/reference/string/pad.md @@ -10,13 +10,13 @@ function pad(str: string, length: number, chars = ' '): string; ``` -## パラメータ +### パラメータ - `str` (`string`): パディングする文字列。 - `length` (`number`): 結果として得られる文字列の長さ。 - `char` (`string`): 文字列をパディングするための文字。デフォルトは `' '` です。 -## 戻り値 +### 戻り値 (`string`): パディングされた文字列。 diff --git a/docs/ko/reference/array/dropRightWhile.md b/docs/ko/reference/array/dropRightWhile.md index 09212e0b..4a987c70 100644 --- a/docs/ko/reference/array/dropRightWhile.md +++ b/docs/ko/reference/array/dropRightWhile.md @@ -20,7 +20,7 @@ function dropRightWhile(arr: T[], canContinueDropping: (item: T) => boolean): (`T[]`): 조건 함수가 `false`를 반환할 때까지 남은 요소들로 이루어진 새로운 배열. -## Examples +## 예시 ```typescript const array = [1, 2, 3, 2, 4, 5]; diff --git a/docs/ko/reference/array/maxBy.md b/docs/ko/reference/array/maxBy.md index 278aaa6b..81cb0ac8 100644 --- a/docs/ko/reference/array/maxBy.md +++ b/docs/ko/reference/array/maxBy.md @@ -20,7 +20,7 @@ function maxBy(items: T[], getValue: (element: T) => number): T | undefined; (`T`): `getValue` 함수를 기준으로, 배열에서 최댓값을 가지는 요소. 배열이 비어 있다면 `undefined`를 반환해요. -### Example +## 예시 ```typescript maxBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // Returns: { a: 3 } diff --git a/docs/ko/reference/array/minBy.md b/docs/ko/reference/array/minBy.md index 1bffa5a1..232f64df 100644 --- a/docs/ko/reference/array/minBy.md +++ b/docs/ko/reference/array/minBy.md @@ -18,7 +18,7 @@ function minBy(items: T[], getValue: (element: T) => number): T | undefined; (`T`): `getValue` 함수를 기준으로, 배열에서 최솟값을 가지는 요소. -### 예시 +## 예시 ```typescript minBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // Returns: { a: 1 } diff --git a/docs/ko/reference/array/orderBy.md b/docs/ko/reference/array/orderBy.md index 8bd7ec66..5bbb001e 100644 --- a/docs/ko/reference/array/orderBy.md +++ b/docs/ko/reference/array/orderBy.md @@ -11,7 +11,7 @@ 조건에 따라 두 요소의 값이 같으면, 다음 조건으로 정렬해요. 만약에 순서의 개수가 조건의 개수보다 적으면, 나머지는 마지막 순서로 정렬돼요. -## Signature +## 인터페이스 ```typescript function orderBy( @@ -21,17 +21,17 @@ function orderBy( ): T[]; ``` -### Parameters +### 파라미터 - `arr` (`T[]`): 정렬할 객체 배열. - `criteria` (`Array<((item: T) => unknown) | keyof T>`): 정렬할 기준. 객체의 프로퍼티 이름이나 함수를 쓸 수 있어요. - `orders` (`Array<'asc' | 'desc'>)`): 각 키에 대한 정렬 방향 배열('asc'는 오름차순, 'desc'는 내림차순). -### Returns +### 반환 값 (`T[]`) 정렬된 배열. -## Examples +## 예시 ```typescript // Sort an array of objects by 'user' in ascending order and 'age' in descending order. diff --git a/docs/ko/reference/array/union.md b/docs/ko/reference/array/union.md index db7b7962..a1e5037e 100644 --- a/docs/ko/reference/array/union.md +++ b/docs/ko/reference/array/union.md @@ -17,7 +17,7 @@ function union(arr1: T[], arr2: T[]): T[]; (`T[]`): 합쳐지고 중복된 값이 제거된 새 배열. -## 예제 +## 예시 ```typescript const array1 = [1, 2, 3]; diff --git a/docs/ko/reference/array/unionBy.md b/docs/ko/reference/array/unionBy.md index 2cbeb59b..8f9d516e 100644 --- a/docs/ko/reference/array/unionBy.md +++ b/docs/ko/reference/array/unionBy.md @@ -17,7 +17,7 @@ function unionBy(arr1: T[], arr2: T[], mapper: (item: T) => U): T[]; - `arr2` (`T[]`): 두 번째 배열. - `mapper`: (`(item: T) => U`): 비교하기 위해 요소를 새로운 값으로 변환할 함수. -### 반환값 +### 반환 값 (`T[]`): 첫 번째 배열과 두 번째 배열을 합치고, `mapper` 가 반환하는 값을 기준으로 고유한 요소만 포함하는 새 배열. diff --git a/docs/ko/reference/array/without.md b/docs/ko/reference/array/without.md index 59d45ca3..cde8d656 100644 --- a/docs/ko/reference/array/without.md +++ b/docs/ko/reference/array/without.md @@ -19,7 +19,7 @@ function without(array: T[], ...values: T[]): T[]; (`T[]`) 주어진 값을 제외한 새 배열. -## Examples +## 예시 ```typescript import { without } from 'es-toolkit/array'; diff --git a/docs/ko/reference/compat/array/concat.md b/docs/ko/reference/compat/array/concat.md index a94820eb..d29e3d74 100644 --- a/docs/ko/reference/compat/array/concat.md +++ b/docs/ko/reference/compat/array/concat.md @@ -22,7 +22,7 @@ function concat(...values: Array): T[]; (`T[]`): 모든 배열과 값이 연결된 새 배열. -### 예시 +## 예시 ```typescript // 값을 연결 diff --git a/docs/ko/reference/compat/array/indexOf.md b/docs/ko/reference/compat/array/indexOf.md index e107c835..0f32aa10 100644 --- a/docs/ko/reference/compat/array/indexOf.md +++ b/docs/ko/reference/compat/array/indexOf.md @@ -27,7 +27,7 @@ function indexOf(array: T[] | null | undefined, searchElement: T, fromIndex?: (`number`): 배열에서 주어진 값과 첫 번째로 일치하는 요소의 인덱스. 일치하는 요소를 찾을 수 없으면 `-1`을 반환해요. -### 예시 +## 예시 ```typescript const array = [1, 2, 3, NaN]; diff --git a/docs/ko/reference/compat/math/max.md b/docs/ko/reference/compat/math/max.md index 998446a6..acf9396d 100644 --- a/docs/ko/reference/compat/math/max.md +++ b/docs/ko/reference/compat/math/max.md @@ -20,13 +20,13 @@ function max(items?: T[]): T | undefined; ### 파라미터 -- `items` (`T[]`): 최댓값을 가지는 요소를 찾을 배열. +- `items` (`T[]`): 최댓값을 가지는 요소를 찾을 배열이에요. ### 반환 값 -(`T`): 배열에서 최솟값을 가지는 요소. 배열이 비어 있다면 `undefined`를 반환해요. +(`T`): 배열에서 최댓값을 가지는 요소. 배열이 비어 있다면 `undefined`를 반환해요. -### 예시 +## 예시 ```typescript max([1, 2, 3]); // Returns: 3 diff --git a/docs/ko/reference/compat/math/min.md b/docs/ko/reference/compat/math/min.md index fb6eff99..01e93193 100644 --- a/docs/ko/reference/compat/math/min.md +++ b/docs/ko/reference/compat/math/min.md @@ -23,7 +23,7 @@ function min(items: T[]): T; ### 반환 값 -(`T`): 최솟값을 가진 요. +(`T`): 배열에서 최솟값을 가지는 요소. 배열이 비어 있다면 `undefined`를 반환해요. ## 예시 diff --git a/docs/ko/reference/compat/object/get.md b/docs/ko/reference/compat/object/get.md index b8cccc9d..10bc0290 100644 --- a/docs/ko/reference/compat/object/get.md +++ b/docs/ko/reference/compat/object/get.md @@ -95,7 +95,7 @@ function get(object: unknown, path: PropertyKey | readonly PropertyKey[], defaul (`Get`): 찾은 값. -### 예시 +## 예시 ```typescript import { get } from 'es-toolkit/compat'; diff --git a/docs/ko/reference/compat/object/property.md b/docs/ko/reference/compat/object/property.md index f1d0b7af..6e91b143 100644 --- a/docs/ko/reference/compat/object/property.md +++ b/docs/ko/reference/compat/object/property.md @@ -22,7 +22,7 @@ function property(path: PropertyKey | readonly PropertyKey[]): (object: unknown) (`(object: unknown) => any`): 객체에서 주어진 경로에 있는 값을 가져오는 함수. -### 예시 +## 예시 ```typescript import { property } from 'es-toolkit/compat'; diff --git a/docs/ko/reference/compat/predicate/isArguments.md b/docs/ko/reference/compat/predicate/isArguments.md index 07f2d6b9..263cbd88 100644 --- a/docs/ko/reference/compat/predicate/isArguments.md +++ b/docs/ko/reference/compat/predicate/isArguments.md @@ -28,8 +28,6 @@ function isArguments(value?: unknown): value is IArguments; ## 예시 -## Examples - ```typescript import { isArguments } from 'es-toolkit/predicate'; diff --git a/docs/ko/reference/compat/predicate/isArrayLikeObject.md b/docs/ko/reference/compat/predicate/isArrayLikeObject.md index 6a686bc2..fa39bdd4 100644 --- a/docs/ko/reference/compat/predicate/isArrayLikeObject.md +++ b/docs/ko/reference/compat/predicate/isArrayLikeObject.md @@ -22,7 +22,7 @@ function isArrayLikeObject(value: unknown): value is ArrayLike & object ### 파라미터 --`value` (`unknown`): 원시값이 아닌 유사 배열 객체인지 확인할 값이에요. +- `value` (`unknown`): 원시값이 아닌 유사 배열 객체인지 확인할 값이에요. ### 반환 값 diff --git a/docs/ko/reference/compat/predicate/isMatch.md b/docs/ko/reference/compat/predicate/isMatch.md index fcc8746c..fd14aa5e 100644 --- a/docs/ko/reference/compat/predicate/isMatch.md +++ b/docs/ko/reference/compat/predicate/isMatch.md @@ -14,14 +14,14 @@ function isMatch(target: unknown, source: unknown): boolean; ``` -## 파라미터 +### 파라미터 - `target` (`unknown`): 모양과 값이 일치하는지 확인할 값. - `source` (`unknown`): 확인할 모양과 값을 가진 객체. -## 반환 값 +### 반환 값 -- (`boolean`): `target`이 `source`의 모양 및 값과 일치하면 `true`. 아니면 `false`. +(`boolean`): `target`이 `source`의 모양 및 값과 일치하면 `true`. 아니면 `false`. ## 예시 diff --git a/docs/ko/reference/compat/predicate/matchesProperty.md b/docs/ko/reference/compat/predicate/matchesProperty.md index 7c5f2eb6..eed23464 100644 --- a/docs/ko/reference/compat/predicate/matchesProperty.md +++ b/docs/ko/reference/compat/predicate/matchesProperty.md @@ -16,14 +16,14 @@ function matchesProperty(property: PropertyKey | PropertyKey[], source: unknown): (target?: unknown) => boolean; ``` -## 파라미터 +### 파라미터 - `property` (`number | string | symbol | Array`): 객체의 프로퍼티를 나타내는 경로. 프로퍼티 이름, 프로퍼티 이름의 배열, 또는 깊은 경로를 나타내는 문자열을 쓸 수 있어요. - `source` (`unknown`): 객체의 프로퍼티와 비교할 값. -## 반환 값 +### 반환 값 -- (`(target: unknown) => boolean`): `target` 객체를 받아서, 주어진 프로퍼티의 값을 가져와서, `source`와 일치하는지 확인하는 함수. 일치하면 `true`, 아니면 `false`를 반환해요. +(`(target: unknown) => boolean`): `target` 객체를 받아서, 주어진 프로퍼티의 값을 가져와서, `source`와 일치하는지 확인하는 함수. 일치하면 `true`, 아니면 `false`를 반환해요. ## 예시 diff --git a/docs/ko/reference/compat/string/padEnd.md b/docs/ko/reference/compat/string/padEnd.md index 85a91298..47d8abcd 100644 --- a/docs/ko/reference/compat/string/padEnd.md +++ b/docs/ko/reference/compat/string/padEnd.md @@ -16,17 +16,17 @@ function padEnd(str: string, length = 0, chars = ' '): string; ``` -## 파라미터 +### 파라미터 - `str` (`string`): 길이를 늘릴 문자열. - `length` (`number`): 늘리고 싶은 길이. 기본값은 `0`. - `char` (`string`): 길이를 늘릴 때 추가할 글자. 기본값은 `' '`. -## 반환 값 +### 반환 값 주어진 길이까지 길어진, 마지막에 글자가 추가된 문자열. -## 예시 값 +## 예시 ```javascript padEnd('hello', 10, 'a'); // 'helloaaaaa' diff --git a/docs/ko/reference/compat/string/padStart.md b/docs/ko/reference/compat/string/padStart.md index e9399dfb..f68f948e 100644 --- a/docs/ko/reference/compat/string/padStart.md +++ b/docs/ko/reference/compat/string/padStart.md @@ -16,17 +16,17 @@ function padStart(str: string, length = 0, chars = ' '): string; ``` -## 파라미터 +### 파라미터 - `str` (`string`): 길이를 늘릴 문자열. - `length` (`number`): 늘리고 싶은 길이. 기본값은 `0`. - `char` (`string`): 길이를 늘릴 때 추가할 글자. 기본값은 `' '`. -## 반환 값 +### 반환 값 주어진 길이까지 길어진, 앞에 글자가 추가된 문자열. -## 예시 값 +## 예시 ```javascript padStart('hello', 10, 'a'); // 'aaaaahello' diff --git a/docs/ko/reference/compat/string/repeat.md b/docs/ko/reference/compat/string/repeat.md index 8aa054a3..109cfbbf 100644 --- a/docs/ko/reference/compat/string/repeat.md +++ b/docs/ko/reference/compat/string/repeat.md @@ -16,16 +16,16 @@ function repeat(str: string, n: number): string; ``` -## 파라미터 +### 파라미터 - `str` (`string`): 반복할 문자열. - `n` (`number`): 반복하시고 싶은 횟수. -## 반환 값 +### 반환 값 주어진 문자열이 n번째 반복된 문자열. -## 예시 값 +## 예시 ```javascript repeat('abc', 0); // '' diff --git a/docs/ko/reference/function/after.md b/docs/ko/reference/function/after.md index 586b827b..7aa8001d 100644 --- a/docs/ko/reference/function/after.md +++ b/docs/ko/reference/function/after.md @@ -16,7 +16,7 @@ function after any>(n: number, func: F): F; - `n` (`number`): `func`이 실행되기 위해 필요한 호출 횟수예요. - `func` (`F`): 실행될 함수예요. -### 결괏값 +### 반환 값 (`F`): 새로운 함수를 반환해요. 이 함수는 다음과 같은 기능을 가져요. diff --git a/docs/ko/reference/function/before.md b/docs/ko/reference/function/before.md index cfbb4757..c0defd63 100644 --- a/docs/ko/reference/function/before.md +++ b/docs/ko/reference/function/before.md @@ -15,7 +15,7 @@ function before any>(n: number, func: F): F; - `n`이 양의 정수인 경우, `func`는 최대 `n-1`번 호출돼요. - `func` (`F`): 호출 횟수 제한이 적용될 함수예요. -### 결괏값 +### 반환 값 (`F`): 새로운 함수를 반환해요. 이 함수는 다음과 같은 기능을 가져요. diff --git a/docs/ko/reference/function/spread.md b/docs/ko/reference/function/spread.md index b950e687..e65df51a 100644 --- a/docs/ko/reference/function/spread.md +++ b/docs/ko/reference/function/spread.md @@ -44,7 +44,7 @@ console.log(spreadGreet(['Alice'])); // Output: Hello, Alice! console.log(spreadGreet(['Bob', 'Hi'])); // Output: Hi, Bob! ``` -## Lodash 호환성 +## Lodash와의 호환성 `es-toolkit/compat`에서 `spread`를 가져오면 lodash와 호환돼요. diff --git a/docs/ko/reference/math/maxBy.md b/docs/ko/reference/math/maxBy.md index 47fc3711..8b464cfe 100644 --- a/docs/ko/reference/math/maxBy.md +++ b/docs/ko/reference/math/maxBy.md @@ -15,11 +15,11 @@ function maxBy(elements: T[], selector: (element: T) => number): T; - `elements`: 검색할 요소들의 배열. - `selector`: 요소를 받아서 객체의 속성을 반환하는 함수. -### 반환값 +### 반환 값 함수의 최대값을 가지는 배열의 첫 번째 요소. 만약 배열이 비어있다면 `undefined`를 반환해요. -### 예시 +## 예시 ```typescript maxBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // 결과: { a: 3 } diff --git a/docs/ko/reference/object/clone.md b/docs/ko/reference/object/clone.md index fb358e2d..f36deb55 100644 --- a/docs/ko/reference/object/clone.md +++ b/docs/ko/reference/object/clone.md @@ -2,21 +2,21 @@ 주어진 객체의 얇은 복사본을 생성해요. -## Signature +## 인터페이스 ```typescript function clone(value: T): T; ``` -### Parameters +### 파라미터 - `obj` (`T`): 복사할 객체예요. -### Returns +### 반환 값 (`T`): 주어진 객체의 얇은 복사본이에요. -## Examples +## 예시 ```typescript const num = 29; diff --git a/docs/ko/reference/object/mapValues.md b/docs/ko/reference/object/mapValues.md index b372c8d8..ac033d39 100644 --- a/docs/ko/reference/object/mapValues.md +++ b/docs/ko/reference/object/mapValues.md @@ -20,7 +20,7 @@ function mapValues, K extends keyof T, V> (`Record`): The new mapped object. -## Examples +## 예시 ```typescript const obj = { a: 1, b: 2 }; diff --git a/docs/ko/reference/object/omit.md b/docs/ko/reference/object/omit.md index 6e43d7c9..0727c270 100644 --- a/docs/ko/reference/object/omit.md +++ b/docs/ko/reference/object/omit.md @@ -27,7 +27,7 @@ const result = omit(obj, ['b', 'c']); // 결과는 다음과 같아요 { a: 1 } ``` -## Lodash와 호환성 +## Lodash와의 호환성 `es-toolkit/compat`에서 `omit` 함수를 가져오면, 깊은 경로를 제외할 수 있어요. diff --git a/docs/ko/reference/object/pick.md b/docs/ko/reference/object/pick.md index 1618767c..a8cafd75 100644 --- a/docs/ko/reference/object/pick.md +++ b/docs/ko/reference/object/pick.md @@ -27,7 +27,7 @@ const result = pick(obj, ['a', 'c']); // 결과는 다음과 같아요 { a: 1, c: 3 } ``` -## Lodash와 호환성 +## Lodash와의 호환성 `es-toolkit/compat`에서 `pick` 함수를 가져오면, 깊은 경로를 선택할 수 있어요. diff --git a/docs/ko/reference/predicate/isEqual.md b/docs/ko/reference/predicate/isEqual.md index 6e54a0ab..d3db728f 100644 --- a/docs/ko/reference/predicate/isEqual.md +++ b/docs/ko/reference/predicate/isEqual.md @@ -2,24 +2,24 @@ `isEqual` 함수는 두 값이 동일한지 확인하며, `Date`, `RegExp`, 깊은 객체 비교도 지원해요. -## Signature +## 인터페이스 ```typescript function isEqual(a: unknown, b: unknown): boolean; ``` -## Parameters +## 파라미터 - **`a`**: `unknown` - 비교할 첫 번째 값. - **`b`**: `unknown` - 비교할 두 번째 값. -## Returns +## 반환 값 - **`boolean`** - 두 값이 동일하면 `true`, 그렇지 않으면 `false`를 반환해요. -## Examples +## 예시 -### Example 1: 원시 타입 값 비교 +### 예시 1: 원시 타입 값 비교 ```javascript isEqual(1, 1); // true @@ -30,14 +30,14 @@ isEqual('hello', 'world'); // false isEqual(true, false); // false ``` -### Example 2: 특수 경우 비교 +### 예시 2: 특수 경우 비교 ```javascript isEqual(NaN, NaN); // true isEqual(+0, -0); // false ``` -### Example 3: 날짜 객체 비교 +### 예시 3: 날짜 객체 비교 ```javascript const date1 = new Date('2020-01-01'); @@ -48,7 +48,7 @@ const date3 = new Date('2021-01-01'); isEqual(date1, date3); // false ``` -### Example 4: 정규 표현식 객체 비교 +### 예시 4: 정규 표현식 객체 비교 ```javascript const regex1 = /hello/g; @@ -59,7 +59,7 @@ const regex3 = /hello/i; isEqual(regex1, regex3); // false ``` -### Example 5: 객체 비교 +### 예시 5: 객체 비교 ```javascript const obj1 = { a: 1, b: { c: 2 } }; @@ -74,7 +74,7 @@ const obj5 = { a: 1, c: 2 }; isEqual(obj4, obj5); // false ``` -### Example 6: 배열 비교 +### 예시 6: 배열 비교 ```javascript const arr1 = [1, 2, 3]; diff --git a/docs/ko/reference/predicate/isPlainObject.md b/docs/ko/reference/predicate/isPlainObject.md index 03b48290..0d3d00c6 100644 --- a/docs/ko/reference/predicate/isPlainObject.md +++ b/docs/ko/reference/predicate/isPlainObject.md @@ -12,11 +12,11 @@ function isPlainObject(object: object): boolean; - `object` (`object`): 검사할 값. -### Returns +### 반환 값 (`boolean`): 값이 순수 객체이면 true. -## Examples +## 예시 ```typescript console.log(isPlainObject({})); // true diff --git a/docs/ko/reference/string/pad.md b/docs/ko/reference/string/pad.md index 77975c0a..feca1350 100644 --- a/docs/ko/reference/string/pad.md +++ b/docs/ko/reference/string/pad.md @@ -10,13 +10,13 @@ function pad(str: string, length: number, chars = ' '): string; ``` -## 파라미터 +### 파라미터 - `str` (`string`): 길이를 맞출 문자열. - `length` (`number`): 문자열을 맞출 길이. - `char` (`string`): 문자열의 길이를 맞추기 위해 사용할 문자. 기본값은 `' '`이에요. -## 반환 값 +### 반환 값 (`string`): 길이가 맞춰진 문자열. diff --git a/docs/reference/array/maxBy.md b/docs/reference/array/maxBy.md index 2a2c15d4..e0ba05bb 100644 --- a/docs/reference/array/maxBy.md +++ b/docs/reference/array/maxBy.md @@ -18,7 +18,7 @@ function maxBy(items: T[], getValue: (element: T) => number): T | undefined; (`T`): The element with the maximum value as determined by the `getValue` function. -### Example +## Example ```typescript maxBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // Returns: { a: 3 } diff --git a/docs/reference/array/minBy.md b/docs/reference/array/minBy.md index 16c844bc..30341bee 100644 --- a/docs/reference/array/minBy.md +++ b/docs/reference/array/minBy.md @@ -18,7 +18,7 @@ function minBy(items: T[], getValue: (element: T) => number): T | undefined; (`T`): The element with the minimum value as determined by the `getValue` function. -### Example +## Example ```typescript minBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // Returns: { a: 1 } diff --git a/docs/reference/compat/array/indexOf.md b/docs/reference/compat/array/indexOf.md index d781a126..f1010a2e 100644 --- a/docs/reference/compat/array/indexOf.md +++ b/docs/reference/compat/array/indexOf.md @@ -27,7 +27,7 @@ function indexOf(array: T[] | null | undefined, searchElement: T, fromIndex?: (`number`): The index (zero-based) of the first occurrence of the value in the array, or `-1` if the value is not found. -### Example +## Example ```typescript const array = [1, 2, 3, NaN]; diff --git a/docs/reference/compat/object/get.md b/docs/reference/compat/object/get.md index 2389f2ec..1b6684e7 100644 --- a/docs/reference/compat/object/get.md +++ b/docs/reference/compat/object/get.md @@ -89,7 +89,7 @@ function get(object: unknown, path: PropertyKey | readonly PropertyKey[], defaul (`Get`): The resolved value. -### Examples +## Examples ```typescript import { get } from 'es-toolkit/compat'; diff --git a/docs/reference/compat/object/property.md b/docs/reference/compat/object/property.md index c3810164..f0b0bc13 100644 --- a/docs/reference/compat/object/property.md +++ b/docs/reference/compat/object/property.md @@ -23,7 +23,7 @@ function property(path: PropertyKey | readonly PropertyKey[]): (object: unknown) (`(object: unknown) => any`): A new function that takes an object and returns the value at the specified path. -### Examples +## Examples ```typescript import { property } from 'es-toolkit/compat'; diff --git a/docs/reference/compat/predicate/isMatch.md b/docs/reference/compat/predicate/isMatch.md index f9d097b5..92999a47 100644 --- a/docs/reference/compat/predicate/isMatch.md +++ b/docs/reference/compat/predicate/isMatch.md @@ -15,14 +15,14 @@ This function supports deep comparison for objects, arrays, maps, and sets. function isMatch(target: unknown, source: unknown): boolean; ``` -## Parameters +### Parameters - `target` (`unknown`): The target value to match against. - `source` (`unknown`): The source value to match with. -## Returns +### Returns -- (`boolean`): Returns `true` if the target matches the source, otherwise `false`. +(`boolean`): Returns `true` if the target matches the source, otherwise `false`. ## Examples diff --git a/docs/reference/compat/predicate/matchesProperty.md b/docs/reference/compat/predicate/matchesProperty.md index b37f6b8a..1a6098ce 100644 --- a/docs/reference/compat/predicate/matchesProperty.md +++ b/docs/reference/compat/predicate/matchesProperty.md @@ -17,14 +17,14 @@ specified path within the source object is equal to the given value. function matchesProperty(property: PropertyKey | PropertyKey[], source: unknown): (target?: unknown) => boolean; ``` -## Parameters +### Parameters - `property` (`number | string | symbol | Array`): The property path to check within the target object. This can be a single property key, an array of property keys, or a string representing a deep path. - `source` (`unknown`): The value to compare against the property value in the target object. -## Returns +### Returns -- (`(target: unknown) => boolean`): A function that takes a target object and returns `true` if the property value at the given path in the target object matches the provided value, otherwise returns `false`. +(`(target: unknown) => boolean`): A function that takes a target object and returns `true` if the property value at the given path in the target object matches the provided value, otherwise returns `false`. ## Examples diff --git a/docs/reference/compat/string/padEnd.md b/docs/reference/compat/string/padEnd.md index 1c240089..4b649260 100644 --- a/docs/reference/compat/string/padEnd.md +++ b/docs/reference/compat/string/padEnd.md @@ -17,13 +17,13 @@ the original string is returned unchanged. function padEnd(str: string, length = 0, chars = ' '): string; ``` -## Parameters +### Parameters - `str` (`string`): The string to pad. - `length` (`number`): The length of the resulting string. Defaults to `0`. - `char` (`string`): The character to pad the string with. Defaults to `' '`. -## Returns +### Returns Returns a new string padded with the specified character until it reaches the specified length. diff --git a/docs/reference/compat/string/padStart.md b/docs/reference/compat/string/padStart.md index 6f812c37..63ba973e 100644 --- a/docs/reference/compat/string/padStart.md +++ b/docs/reference/compat/string/padStart.md @@ -17,13 +17,13 @@ the original string is returned unchanged. function padStart(str: string, length = 0, chars = ' '): string; ``` -## Parameters +### Parameters - `str` (`string`): The string to pad. - `length` (`number`): The length of the resulting string. Defaults to `0`. - `char` (`string`): The character to pad the string with. Defaults to `' '`. -## Returns +### Returns Returns a new string padded with the specified character until it reaches the specified length. diff --git a/docs/reference/string/pad.md b/docs/reference/string/pad.md index 80de8b0e..9b44ae88 100644 --- a/docs/reference/string/pad.md +++ b/docs/reference/string/pad.md @@ -10,13 +10,13 @@ If the length is less than or equal to the original string's length, or if the p function pad(str: string, length: number, chars = ' '): string; ``` -## Parameters +### Parameters - `str` (`string`): The string to pad. - `length` (`number`): The length of the resulting string. - `char` (`string`): The character to pad the string with. Defaults to `' '`. -## Returns +### Returns (`string`): Returns the padded string. diff --git a/docs/zh_hans/reference/array/maxBy.md b/docs/zh_hans/reference/array/maxBy.md index 65e1b7d0..7a15dba1 100644 --- a/docs/zh_hans/reference/array/maxBy.md +++ b/docs/zh_hans/reference/array/maxBy.md @@ -20,7 +20,7 @@ function maxBy(items: T[], getValue: (element: T) => number): T | undefined; (`T`) 由 `getValue` 函数确定的具有最大值的元素。如果数组为空,则返回 `undefined`。 -### 示例 +## 示例 ```typescript maxBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // 返回: { a: 3 } diff --git a/docs/zh_hans/reference/array/minBy.md b/docs/zh_hans/reference/array/minBy.md index 91c82975..641007f6 100644 --- a/docs/zh_hans/reference/array/minBy.md +++ b/docs/zh_hans/reference/array/minBy.md @@ -20,7 +20,7 @@ function minBy(items: T[], getValue: (element: T) => number): T | undefined; (`T`) 由 `getValue` 函数确定的具有最小值的元素。如果数组为空,则返回 `undefined`。 -### 示例 +## 示例 ```typescript minBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // 返回: { a: 1 } diff --git a/docs/zh_hans/reference/compat/object/get.md b/docs/zh_hans/reference/compat/object/get.md index 1cb73bc4..2eadd86a 100644 --- a/docs/zh_hans/reference/compat/object/get.md +++ b/docs/zh_hans/reference/compat/object/get.md @@ -90,7 +90,7 @@ function get(object: unknown, path: PropertyKey | readonly PropertyKey[], defaul (`Get`): 解析后的值。 -### 示例 +## 示例 ```typescript import { get } from 'es-toolkit/compat'; diff --git a/docs/zh_hans/reference/compat/object/property.md b/docs/zh_hans/reference/compat/object/property.md index f6ba5bbd..2413a941 100644 --- a/docs/zh_hans/reference/compat/object/property.md +++ b/docs/zh_hans/reference/compat/object/property.md @@ -23,7 +23,7 @@ function property(path: PropertyKey | readonly PropertyKey[]): (object: unknown) - `(object: unknown) => any`: 一个函数,接收一个对象并返回指定路径的值。 -### 示例 +## 示例 ```typescript import { property } from 'es-toolkit/compat'; diff --git a/docs/zh_hans/reference/compat/predicate/isArrayLikeObject.md b/docs/zh_hans/reference/compat/predicate/isArrayLikeObject.md index 24ed8a8c..b491610e 100644 --- a/docs/zh_hans/reference/compat/predicate/isArrayLikeObject.md +++ b/docs/zh_hans/reference/compat/predicate/isArrayLikeObject.md @@ -22,7 +22,7 @@ function isArrayLikeObject(value: unknown): value is ArrayLike & object ### 参数 --`value` (`unknown`): 要检查是否为非原始的、类似数组的对象的值。 +- `value` (`unknown`): 要检查是否为非原始的、类似数组的对象的值。 ### 返回值 diff --git a/docs/zh_hans/reference/compat/predicate/isMatch.md b/docs/zh_hans/reference/compat/predicate/isMatch.md index 71fc01c6..465bf3c4 100644 --- a/docs/zh_hans/reference/compat/predicate/isMatch.md +++ b/docs/zh_hans/reference/compat/predicate/isMatch.md @@ -16,14 +16,14 @@ function isMatch(target: unknown, source: unknown): boolean; ``` -## 参数 +### 参数 - `target` (`unknown`): 要匹配的目标值。 - `source` (`unknown`): 用于匹配的源值。 -## 返回值 +### 返回值 -- (`boolean`): 如果目标与源匹配,则返回 `true`,否则返回 `false`。 +(`boolean`): 如果目标与源匹配,则返回 `true`,否则返回 `false`。 ## 示例 diff --git a/docs/zh_hans/reference/compat/predicate/matchesProperty.md b/docs/zh_hans/reference/compat/predicate/matchesProperty.md index 2f9b1f3f..119fc9be 100644 --- a/docs/zh_hans/reference/compat/predicate/matchesProperty.md +++ b/docs/zh_hans/reference/compat/predicate/matchesProperty.md @@ -17,14 +17,14 @@ function matchesProperty(property: PropertyKey | PropertyKey[], source: unknown): (target?: unknown) => boolean; ``` -## 参数 +### 参数 - `property` (`number | string | symbol | Array`): 需要检查的目标对象中的属性路径。可以是单个属性键、属性键数组,或表示深层路径的字符串。 - `source` (`unknown`): 要与目标对象中属性值进行比较的值。 -## 返回值 +### 返回值 -- (`(target: unknown) => boolean`): 一个函数,接受一个目标对象,如果目标对象中指定路径的属性值与提供的值匹配,则返回 `true`,否则返回 `false`。 +(`(target: unknown) => boolean`): 一个函数,接受一个目标对象,如果目标对象中指定路径的属性值与提供的值匹配,则返回 `true`,否则返回 `false`。 ## 示例 diff --git a/docs/zh_hans/reference/compat/string/padEnd.md b/docs/zh_hans/reference/compat/string/padEnd.md index 3e564f9d..552014d5 100644 --- a/docs/zh_hans/reference/compat/string/padEnd.md +++ b/docs/zh_hans/reference/compat/string/padEnd.md @@ -17,13 +17,13 @@ function padEnd(str: string, length = 0, chars = ' '): string; ``` -## 参数 +### 参数 - `str` (`string`): 要填充的字符串。 - `length` (`number`): 填充后的字符串长度。默认值为 `0`。 - `char` (`string`): 用于填充字符串的字符。默认值为 `' '`。 -## 返回值 +### 返回值 返回一个新的字符串,该字符串用指定的字符填充,直到达到指定的长度。 diff --git a/docs/zh_hans/reference/compat/string/padStart.md b/docs/zh_hans/reference/compat/string/padStart.md index 67530734..7b4fe6d6 100644 --- a/docs/zh_hans/reference/compat/string/padStart.md +++ b/docs/zh_hans/reference/compat/string/padStart.md @@ -17,13 +17,13 @@ function padStart(str: string, length = 0, chars = ' '): string; ``` -## 参数 +### 参数 - `str` (`string`): 要填充的字符串。 - `length` (`number`): 填充后的字符串长度。默认值为 `0`。 - `char` (`string`): 用于填充字符串的字符。默认值为 `' '`。 -## 返回值 +### 返回值 返回一个新的字符串,该字符串用指定的字符填充,直到达到指定的长度。