Skip to content

Commit

Permalink
feat: Add stub methods
Browse files Browse the repository at this point in the history
  • Loading branch information
raon0211 committed Dec 1, 2024
1 parent 917aff0 commit 537e8a4
Show file tree
Hide file tree
Showing 71 changed files with 673 additions and 61 deletions.
25 changes: 25 additions & 0 deletions docs/ja/reference/compat/util/stubArray.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# stubArray

::: info
この関数は互換性のために `es-toolkit/compat` からのみインポートできます。代替可能なネイティブ JavaScript API があるか、まだ十分に最適化されていないためです。

`es-toolkit/compat` からこの関数をインポートすると、[lodash と完全に同じように動作](../../../compatibility.md)します。
:::

新しい空の配列を返します。

## インターフェース

```typescript
function stubArray(): [];
```

### 戻り値

(`Array`): 新しい空の配列。

##

```typescript
stubArray(); // Returns []
```
25 changes: 25 additions & 0 deletions docs/ja/reference/compat/util/stubFalse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# stubFalse

::: info
この関数は互換性のために `es-toolkit/compat` からのみインポートできます。代替可能なネイティブ JavaScript API があるか、まだ十分に最適化されていないためです。

`es-toolkit/compat` からこの関数をインポートすると、[lodash と完全に同じように動作](../../../compatibility.md)します。
:::

`false`を返します。

## インターフェース

```typescript
function stubFalse(): false;
```

### 戻り値

(`false`): false。

##

```typescript
stubFalse(); // Returns false
```
25 changes: 25 additions & 0 deletions docs/ja/reference/compat/util/stubObject.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# stubObject

::: info
この関数は互換性のために `es-toolkit/compat` からのみインポートできます。代替可能なネイティブ JavaScript API があるか、まだ十分に最適化されていないためです。

`es-toolkit/compat` からこの関数をインポートすると、[lodash と完全に同じように動作](../../../compatibility.md)します。
:::

空のオブジェクトを返します。

## インターフェース

```typescript
function stubObject(): {};
```

### 戻り値

(`Object`): 空のオブジェクト。

##

```typescript
stubObject(); // Returns {}
```
25 changes: 25 additions & 0 deletions docs/ja/reference/compat/util/stubString.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# stubString

::: info
この関数は互換性のために `es-toolkit/compat` からのみインポートできます。代替可能なネイティブ JavaScript API があるか、まだ十分に最適化されていないためです。

`es-toolkit/compat` からこの関数をインポートすると、[lodash と完全に同じように動作](../../../compatibility.md)します。
:::

空の文字列を返します。

## インターフェース

```typescript
function stubString(): '';
```

### 戻り値

(`string`): 空の文字列ます。

##

```typescript
stubString(); // Returns ''
```
25 changes: 25 additions & 0 deletions docs/ja/reference/compat/util/stubTrue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# stubTrue

::: info
この関数は互換性のために `es-toolkit/compat` からのみインポートできます。代替可能なネイティブ JavaScript API があるか、まだ十分に最適化されていないためです。

`es-toolkit/compat` からこの関数をインポートすると、[lodash と完全に同じように動作](../../../compatibility.md)します。
:::

`true`を返します。

## インターフェース

```typescript
function stubTrue(): true;
```

### 戻り値

(`true`): `true`

##

```typescript
stubTrue(); // Returns true
```
25 changes: 25 additions & 0 deletions docs/ko/reference/compat/util/stubArray.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# stubArray

::: info
이 함수는 호환성을 위한 `es-toolkit/compat` 에서만 가져올 수 있어요. 대체할 수 있는 네이티브 JavaScript API가 있거나, 아직 충분히 최적화되지 않았기 때문이에요.

`es-toolkit/compat`에서 이 함수를 가져오면, [lodash와 완전히 똑같이 동작](../../../compatibility.md)해요.
:::

새로운 빈 배열을 반환해요.

## 인터페이스

```typescript
function stubArray(): [];
```

### 반환 값

(`[]`): 새로운 빈 배열.

## 예시

```typescript
stubArray(); // Returns []
```
25 changes: 25 additions & 0 deletions docs/ko/reference/compat/util/stubFalse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# stubFalse

::: info
이 함수는 호환성을 위한 `es-toolkit/compat` 에서만 가져올 수 있어요. 대체할 수 있는 네이티브 JavaScript API가 있거나, 아직 충분히 최적화되지 않았기 때문이에요.

`es-toolkit/compat`에서 이 함수를 가져오면, [lodash와 완전히 똑같이 동작](../../../compatibility.md)해요.
:::

`false`를 반환해요.

## 인터페이스

```typescript
function stubFalse(): false;
```

### 반환 값

(`false`): `false`.

## 예시

```typescript
stubFalse(); // Returns false
```
25 changes: 25 additions & 0 deletions docs/ko/reference/compat/util/stubObject.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# stubObject

::: info
이 함수는 호환성을 위한 `es-toolkit/compat` 에서만 가져올 수 있어요. 대체할 수 있는 네이티브 JavaScript API가 있거나, 아직 충분히 최적화되지 않았기 때문이에요.

`es-toolkit/compat`에서 이 함수를 가져오면, [lodash와 완전히 똑같이 동작](../../../compatibility.md)해요.
:::

빈 객체를 반환해요.

## 인터페이스

```typescript
function stubObject(): {};
```

### 반환 값

(`{}`): 빈 객체.

## 예시

```typescript
stubObject(); // Returns {}
```
25 changes: 25 additions & 0 deletions docs/ko/reference/compat/util/stubString.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# stubString

::: info
이 함수는 호환성을 위한 `es-toolkit/compat` 에서만 가져올 수 있어요. 대체할 수 있는 네이티브 JavaScript API가 있거나, 아직 충분히 최적화되지 않았기 때문이에요.

`es-toolkit/compat`에서 이 함수를 가져오면, [lodash와 완전히 똑같이 동작](../../../compatibility.md)해요.
:::

빈 문자열을 반환해요.

## 인터페이스

```typescript
function stubString(): '';
```

### 반환 값

(`''`): 빈 문자열.

## 예시

```typescript
stubString(); // Returns ''
```
25 changes: 25 additions & 0 deletions docs/ko/reference/compat/util/stubTrue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# stubTrue

::: info
이 함수는 호환성을 위한 `es-toolkit/compat` 에서만 가져올 수 있어요. 대체할 수 있는 네이티브 JavaScript API가 있거나, 아직 충분히 최적화되지 않았기 때문이에요.

`es-toolkit/compat`에서 이 함수를 가져오면, [lodash와 완전히 똑같이 동작](../../../compatibility.md)해요.
:::

`true`를 반환해요.

## 인터페이스

```typescript
function stubTrue(): true;
```

### 반환 값

(`true`): `true`.

## 예시

```typescript
stubTrue(); // Returns true
```
25 changes: 25 additions & 0 deletions docs/reference/compat/util/stubArray.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# stubArray

::: info
This function is only available in `es-toolkit/compat` for compatibility reasons. It either has alternative native JavaScript APIs or isn’t fully optimized yet.

When imported from `es-toolkit/compat`, it behaves exactly like lodash and provides the same functionalities, as detailed [here](../../../compatibility.md).
:::

Returns a new empty array.

## Signature

```typescript
function stubArray(): [];
```

### Returns

(`[]`): A new empty array.

## Examples

```typescript
stubArray(); // Returns []
```
25 changes: 25 additions & 0 deletions docs/reference/compat/util/stubFalse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# stubFalse

::: info
This function is only available in `es-toolkit/compat` for compatibility reasons. It either has alternative native JavaScript APIs or isn’t fully optimized yet.

When imported from `es-toolkit/compat`, it behaves exactly like lodash and provides the same functionalities, as detailed [here](../../../compatibility.md).
:::

Returns false.

## Signature

```typescript
function stubFalse(): false;
```

### Returns

(`false`): false.

## Examples

```typescript
stubFalse(); // Returns false
```
25 changes: 25 additions & 0 deletions docs/reference/compat/util/stubObject.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# stubObject

::: info
This function is only available in `es-toolkit/compat` for compatibility reasons. It either has alternative native JavaScript APIs or isn’t fully optimized yet.

When imported from `es-toolkit/compat`, it behaves exactly like lodash and provides the same functionalities, as detailed [here](../../../compatibility.md).
:::

Returns an empty object.

## Signature

```typescript
function stubObject(): {};
```

### Returns

(`{}`): An empty object.

## Examples

```typescript
stubObject(); // Returns {}
```
25 changes: 25 additions & 0 deletions docs/reference/compat/util/stubString.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# stubString

::: info
This function is only available in `es-toolkit/compat` for compatibility reasons. It either has alternative native JavaScript APIs or isn’t fully optimized yet.

When imported from `es-toolkit/compat`, it behaves exactly like lodash and provides the same functionalities, as detailed [here](../../../compatibility.md).
:::

Returns an empty string.

## Signature

```typescript
function stubString(): '';
```

### Returns

(`''`): An empty string.

## Examples

```typescript
stubString(); // Returns ''
```
25 changes: 25 additions & 0 deletions docs/reference/compat/util/stubTrue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# stubTrue

::: info
This function is only available in `es-toolkit/compat` for compatibility reasons. It either has alternative native JavaScript APIs or isn’t fully optimized yet.

When imported from `es-toolkit/compat`, it behaves exactly like lodash and provides the same functionalities, as detailed [here](../../../compatibility.md).
:::

Returns true.

## Signature

```typescript
function stubTrue(): true;
```

### Returns

(`true`): true.

## Examples

```typescript
stubTrue(); // Returns true
```
Loading

0 comments on commit 537e8a4

Please sign in to comment.