| toArray(value) | 値を配列に変換します | {{ functions.toArray('abc') }} // ['abc'] |
| toBoolean(value) | 値をブール値に変換します | {{ functions.toBoolean(1) }} // true
{{ functions.toBoolean(0) }} // false |
| length(value) | パラメーター値の長さを返します | {{ functions.length('auth0') }} // 5 |
| mask(value) | 実行時に公開されないように値をマスクします | {{ functions.mask('my_awesome_secret') }} // ███ |
| toNumber(value) | 値を数値に変換します | {{ functions.toNumber('123') }} // 123 |
| random(min, max, [boolean]) | 最小値と最大値の間の乱数を返します | {{ functions.random(0, 6) }} // 4
{{ functions.random(0, 6, true) }} // 3.8523497... |
| slice(value, start, end) | 開始インデックスと終了インデックスの間の値配列または文字列のセクションを返します | {{ functions.slice( 'example', 3, 5) }} // 'mp' |
| toString(value) | 値を文字列に変換します | {{ functions.toString(123) }} // '123' |
| substring(value, 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 |
| replaceAll(value, string, replacement) | パターンに一致するすべての部分を置換文字列に置き換えた新しい文字列を返します。 | {{ functions.replaceall('2021-04-30', '-', '/') }} // 2021/04/30 |
| replace(value, string, replacement) | パターンに一致するすべての部分を置換文字列に置き換えた新しい文字列を返します。パターンが文字列の場合、最初の出現のみが置換されます。 | {{ functions.replace('2021-04-30', '-', '/') }} // 2021/04-30 |
| split(value, Separator, limit?) | セパレーターで区切られた部分文字列の順序付きリストを返します。 | {{ functions.split('2021-04-30', '-') }} // ['2021', '04', '30'] |
| now() | 現在の日付をISO8601形式で返します。 | {{ functions.now() }} // 2021-04-30T10:31:28.576Z |
| includes(collection, item, fromIndex?) | 配列のエントリに特定の値が含まれているかどうかを返します。 | {{ functions.includes(['auth0', 'identity', 'authentication'], 'identity') }} // true |
| indexOf(collection, item, fromIndex?) | 配列内で特定の要素が見つかる最初のインデックスを返します。存在しない場合は-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 |