Skip to content

Commit

Permalink
chore: format docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Aybrea committed Oct 30, 2024
1 parent 73243e8 commit 5597afd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions docs/array/find.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ Finds the `first` or `last` element in an array that meets a specified condition
```ts
import { find } from 'rattail'

find(['a', 'b', 'c'], (item) => item === 'a')
find(['a', 'b', 'c'], (item) => item === 'a')
// return ['a', 0]
find(['a', 'b', 'a'], (item) => item === 'a', 'end')
find(['a', 'b', 'a'], (item) => item === 'a', 'end')
// return ['a', 2]
```

### Arguments

| Arg | Type | Defaults |
| ------ | ------------------------------------------------- | --------- |
| `arr` | `Array` | |
| Arg | Type | Defaults |
| ------ | ----------------------------------------------------- | --------- |
| `arr` | `Array` | |
| `fn` | `(item: any, index: number, array: Array) => boolean` | |
| `from` | `'start' \| 'end'` | `'start'` |
| `from` | `'start' \| 'end'` | `'start'` |

### Return

Expand Down
2 changes: 1 addition & 1 deletion docs/array/remove-array-blank.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ removeArrayBlank([1, null, 2, undefined, 3]) // return [1, 2, 3]

| Arg | Type | Defaults |
| ----- | ------- | -------- |
| `arr` | `Array` | |
| `arr` | `Array` | |

### Return

Expand Down
8 changes: 4 additions & 4 deletions docs/zh/array/find.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ find(['a', 'b', 'a'], (item) => item === 'a', 'end')

### 参数

| 参数 | 类型 | 默认值 |
| ------ | ------------------------------------------------- | --------- |
| `arr` | `Array` | |
| 参数 | 类型 | 默认值 |
| ------ | ----------------------------------------------------- | --------- |
| `arr` | `Array` | |
| `fn` | `(item: any, index: number, array: Array) => boolean` | |
| `from` | `'start' \| 'end'` | `'start'` |
| `from` | `'start' \| 'end'` | `'start'` |

### 返回值

Expand Down

0 comments on commit 5597afd

Please sign in to comment.