Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(JP) ADD documentation about new transformations (#4561) #4562

Merged
merged 2 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
175 changes: 162 additions & 13 deletions doc/manuals.jp/orion-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,27 +79,34 @@
- [`uppercase`](#uppercase)
- [`lowercase`](#lowercase)
- [`split`](#split)
- [`indexOf`](#indexOf)
- [`indexOf`](#indexof)
- [`len`](#len)
- [`trim`](#trim)
- [`substring`](#substring)
- [`includes`](#includes)
- [`isNaN`](#isNaN)
- [`parseInt`](#parseInt)
- [`parseFloat`](#parseFloat)
- [`parseInt`](#parseint)
- [`parseFloat`](#parsefloat)
- [`typeOf`](#typeOf)
- [`toString`](#toString)
- [`toString`](#tostring)
- [`toJson`](#tojson)
- [`floor`](#floor)
- [`ceil`](#ceil)
- [`round`](#round)
- [`toFixed`](#toFixed)
- [`toFixed`](#tofixed)
- [`log`](#log)
- [`log10`](#log10)
- [`log2`](#log2)
- [`sqrt`](#sqrt)
- [`replaceStr`](#replaceStr)
- [`replaceStr`](#replacestr)
- [`replaceRegex`](#replaceregex)
- [`matchRegex`](#matchregex)
- [`mapper`](#mapper)
- [`thMapper`](#thmapper)
- [`values`](#values)
- [`keys`](#keys)
- [`arrSum`](#arrsum)
- [`arrAvg`](#arravg)
- [フェイルセーフ・ケース (Failsafe cases)](#failsafe-cases)
- [既知の制限 (Known limitations)](#known-limitations)
- [Oneshot サブスクリプション (Oneshot Subscriptions)](#oneshot-subscriptions)
Expand Down Expand Up @@ -2600,7 +2607,7 @@ c|split(',')
[ "foo", "bar", "zzz" ]
```

<a name="indexOf"></a>
<a name="indexof"></a>

#### indexOf

Expand Down Expand Up @@ -2726,7 +2733,7 @@ c|isNaN
true
```

<a name="parseInt"></a>
<a name="parseint"></a>

#### parseInt

Expand All @@ -2746,7 +2753,7 @@ c|parseInt
25
```

<a name="parseFloat"></a>
<a name="parsefloat"></a>

#### parseFloat

Expand Down Expand Up @@ -2786,11 +2793,11 @@ c|typeOf
"Number"
```

<a name="toString"></a>
<a name="tostring"></a>

#### toString

Return a string representation of the input.
入力の文字列表現を返します。

追加引数: なし

Expand All @@ -2806,6 +2813,26 @@ c|toString
"23"
```

<a name="tojson"></a>

#### toJson

入力文字列を JSON ドキュメントに変換します。文字列が有効な JSON でない場合は、`null` を返します。

追加引数: なし

例 (コンテキスト `{"c": "[1,2]"}`):

```
c|toJson
```

結果

```
[1, 2]
```

<a name="floor"></a>

#### floor
Expand Down Expand Up @@ -2866,7 +2893,7 @@ c|round
3
```

<a name="toFixed"></a>
<a name="tofixed"></a>

#### toFixed

Expand Down Expand Up @@ -2966,7 +2993,7 @@ c|sqrt
1.772004514666935
```

<a name="replaceStr"></a>
<a name="replacestr"></a>

#### replaceStr

Expand All @@ -2988,6 +3015,48 @@ c|replaceStr('o','u')
"fuubar"
```

<a name="replaceregex"></a>

#### replaceRegex

入力文字列内の指定された正規表現に一致するトークンを別の文字列に置き換えます。

追加引数:
* 置換するトークンに一致する正規表現
* 置換先の文字列

例 (コンテキスト `{"c": "aba1234aba786aba"}`):

```
c|replaceRegex('\d+','X')
```

結果

```
"abaXabaXaba"
```

<a name="matchregex"></a>

#### matchRegex

入力文字列内の指定された正規表現に一致するトークンの配列を返します。無効な正規表現の場合は、`null` を返します。一致するものが見つからない場合は、空の配列 (`[]`) を返します。

追加引数: 正規表現

例 (コンテキスト `{"c": "abc1234fgh897hyt"}`):

```
c|matchRegex('\d+`)
```

結果

```
["1234, "897"]]
```

<a name="mapper"></a>

#### mapper
Expand Down Expand Up @@ -3036,6 +3105,86 @@ c|thMapper(values,choices)
"medium"
```

<a name="values"></a>

#### values

指定されたオブジェクトのキーの値を含む配列を返します (入力がオブジェクトでない場合は `null`)。

追加引数: なし

例 (コンテキスト `{"c": {"x": 1, "y": "foo"}}`):

```
c|values
```

結果

```
[1,"foo"]
```

<a name="keys"></a>

#### keys

指定されたオブジェクトのキーを含む配列を返します (入力がオブジェクトでない場合は `null`)。

追加引数: なし

例 (コンテキスト `{"c": {"x": 1, "y": "foo"}}`):

```
c|keys
```

結果

```
["x","y"]
```

<a name="arrsum"></a>

#### arrSum

配列の要素の合計を返します (配列内の入力または配列に数値以外の項目が含まれている場合は `null` を返します)。

追加引数: なし

例 (コンテキスト `{"c": [1, 5]}`):

```
c|arrSum
```

結果

```
6
```

<a name="arravg"></a>

#### arrAvg

配列の要素の平均を返します (配列内の入力または配列に数値以外の項目が含まれている場合は `null` を返します)。

追加引数: なし

例 (コンテキスト `{"c": [1, 5]}`):

```
c|arrAvg
```

結果

```
3
```

<a name="failsafe-cases"></a>

### フェイルセーフ・ケース (Failsafe cases)
Expand Down
4 changes: 2 additions & 2 deletions doc/manuals/orion-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3084,7 +3084,7 @@ results in

#### arrSum

Returns the sum of the elements of an array (or `null` if the input in an array or the array containts some not numberic item).
Returns the sum of the elements of an array (or `null` if the input in an array or the array contains some not numberic item).

Extra arguments: none

Expand All @@ -3102,7 +3102,7 @@ results in

#### arrAvg

Returns the average of the elements of an array (or `null` if the input in an array or the array containts some not numberic item).
Returns the average of the elements of an array (or `null` if the input in an array or the array contains some not numberic item).

Extra arguments: none

Expand Down
Loading