toArray(value) | 値を配列に変換します。 | {{ functions.toArray('abc') }} // ['abc'] |
toBoolean(value) | 値をブール値に変換します。 | {{ functions.toBoolean(1) }} // true<br /><br />\{\{ functions.toBoolean(0) }} // false |
length(value) | パラメーター値の長さを返します。 | {{ functions.length('auth0') }} // 5 |
mask(value) | Executions に表示されないように値をマスクします。 | {{ functions.mask('my_awesome_secret') }} // ███ |
toNumber(value) | value を数値に変換します。 | {{ functions.toNumber('123') }} // 123 |
random(min, max, [boolean]) | min 以上 max 以下の範囲でランダムな数値を返します。 | {{ functions.random(0, 6) }} // 4 <br /><br />\{\{ functions.random(0, 6, true) }} // 3.8523497... |
slice(value, start, end) | 開始インデックスから終了インデックスまでの value 配列または文字列の一部を返します。 | {{ functions.slice( 'example', 3, 5) }} // 'mp' |
toString(value) | value を文字列に変換します。 | {{ functions.toString(123) }} // '123' |
substring(value, start, end) | 値の start インデックスから end インデックスまでの部分を返します。slice 関数と substring 関数の違いについては、こちらを参照してください | {{ functions.substring( 'example’', 3, 5) }} // 'mp' |
toTimestamp() | 現在の UNIX タイムスタンプを返します。 | {{ functions.toTimestamp() }} // 1628761483 |
toTimestamp(date) | 指定した日付の UNIX 時間を返します。 | {{ functions.toTimestamp('2021-04-30T10:02:50.876Z') }} // 1619776970 |
toTimestamp(date) | 指定した日付の UNIX 時間を返します。 | {{ functions.toTimestamp('2021-04-30T10:02:50.876Z') }} // 1619776970 |
toLowerCase(value) | 小文字に変換した新しい文字列を返します。 | {{ functions.toLowerCase('JohnDoe 1234') }} // johndoe 1234 |
toUpperCase(value) | 大文字に変換した新しい文字列を返します。 | {{ functions.toUpperCase('JohnDoe 1234') }} // JOHNDOE 1234 |
replaceAll(value, string, replacement) | パターンに一致するすべての箇所を置換文字列に置き換えた、新しい文字列を返します。 | {{ functions.replaceAll('2021-04-30', '-', '/') }} // 2021/04/30 |
replace(value, string, replacement) | パターンに一致するすべての箇所を置換文字列に置き換えた、新しい文字列を返します。pattern が文字列の場合は、最初の出現箇所のみが置換されます。 | {{ functions.replace('2021-04-30', '-', '/') }} // 2021/04-30 |
split(value, separator, limit?) | 区切り文字で分割された部分文字列の順序付きリストを返します。 | {{ functions.split('2021-04-30', '-') }} // ['2021', '04', '30'] |
now() | 現在の日付を ISO 8601 形式で返します。 | {{ functions.now() }} // 2021-04-30T10:31:28.576Z |
includes(collection, item, fromIndex?) | 配列の要素に特定の値が含まれているかどうかを返します。 | {{ functions.includes(['auth0', 'identity', 'authentication'], 'identity') }} // true |
indexOf(collection, item, fromIndex?) | 配列内で指定した要素が最初に見つかる位置の index を返し、存在しない場合は -1 を返します。 | {{ functions.indexOf(['auth0', 'identity', 'authentication'], 'identity') }} // 1 |
merge(base, value) | ベースのデータ型に応じて、結合された配列またはオブジェクト、あるいは連結された文字列を返します。 | {{ functions.merge(['auth0', 'identity'], ['authentication']) }} // ['auth0', 'identity', 'authentication'] |
md5(value) | MD5でハッシュ化した値を返します。 | {{ functions.md5('auth0') }} // 7bbb597... |
sha1(value) | SHA1ハッシュ値を返します。 | {{ functions.sha1('auth0') }} // b4ec5339... |
sha256(value) | SHA256ハッシュ値を返します。 | {{ functions.sha256('auth0') }} // d9082bdc... |
sha512(value) | SHA512ハッシュ値を返します。 | {{ functions.sha512('auth0') }} // c0d588069d... |
uuid() | ランダムな v4 UUID を返します。 | {{ functions.uuid() }} // 36b8f84d-df4e-4d49-b662-bcde71a8764 |