mirror of
https://github.com/toss/es-toolkit.git
synced 2025-01-05 23:43:29 +03:00
style: Fix prettier
This commit is contained in:
parent
98f71ff7fa
commit
aca23abae5
@ -1,10 +1,10 @@
|
||||
import { bench, describe } from 'vitest';
|
||||
import { isMap as isMapToolkit_ } from 'es-toolkit';
|
||||
import { isMap as isMapToolkitCompat_ } from 'es-toolkit/compat'
|
||||
import { isMap as isMapToolkitCompat_ } from 'es-toolkit/compat';
|
||||
import { isMap as isMapLodash_ } from 'lodash';
|
||||
|
||||
const isMapToolkit = isMapToolkit_;
|
||||
const isMapToolkitCompat = isMapToolkitCompat_ ;
|
||||
const isMapToolkitCompat = isMapToolkitCompat_;
|
||||
const isMapLodash = isMapLodash_;
|
||||
|
||||
describe('isMap', () => {
|
||||
|
@ -51,11 +51,11 @@ const combined = flowRight(square, add);
|
||||
console.log(combined(1, 2)); // 9
|
||||
```
|
||||
|
||||
## Lodash 互換性
|
||||
## Lodash 互換性
|
||||
|
||||
`es-toolkit/compat` から `flowRight` をインポートすると、Lodash と互換になります。
|
||||
|
||||
- `flowRight` は関数の配列と個別の関数の両方を引数として受け入れます。
|
||||
- `flowRight` は関数の配列と個別の関数の両方を引数として受け入れます。
|
||||
- 提供された関数が関数でない場合、`flowRight` はエラーをスローします。
|
||||
|
||||
```typescript
|
||||
|
@ -51,8 +51,7 @@ const combined = flowRight(square, add);
|
||||
console.log(combined(1, 2)); // 9
|
||||
```
|
||||
|
||||
|
||||
## Lodash와 호환성
|
||||
## Lodash와 호환성
|
||||
|
||||
`es-toolkit/compat`에서 `flowRight`를 가져오면 lodash와 완전히 호환돼요.
|
||||
|
||||
@ -68,4 +67,4 @@ const double = (n: number) => n * 2;
|
||||
|
||||
const combined = flowRight(double, [square, add]);
|
||||
console.log(combined(1, 2)); // => 18
|
||||
```
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user