KScript ドキュメント
JA

言語

英語から自動翻訳されています。原文は英語です。

変更点

コマンド

以前 今
@to_upper($t), @to_lower($t) $t->upper(), $t->lower()
@string($v), @number($t), @date($t), @type($v) $v->to_string(), $t->to_number(), $t->to_date(), $v->type()
@json($t), @to_json($v), @yaml($t), @to_yaml($v) $t->convert(from: json), $v->convert(to: json), $t->convert(from: yaml), $v->convert(to: yaml)
@escape($t), @base64($t), @url_encode($t), @url_decode($t) $t->escape(), $t->to_base64(), $t->url_encode(), $t->url_decode()
@pow($a, $b) $a ** $b
@guid() @uuid()
@contrast(...) @contrast_color(color, dark?, light?)
@signed_in() @is_signed_in()
@log(8, 2) @logarithm(8, 2)(log はログエントリを書き込む文です)
@config('database.port', 5432) $config.database.port、または $config->get('database.port', 5432)
@exit(1), @error('Too short') exit 1, throw Validation "Too short"
@transaction(...) transaction 文、または $db->transaction(fn)