KScript docs
EN

card fields and methods

A field is a plain fact about the value, read with a dot and no brackets: $value.name. A method takes arguments or does work, and is called with ->: $value->name(arguments), or with the value piped in: $value |> name(arguments).

Fields

FieldTypeDescription
.brandstringvisa, mastercard, amex, discover, jcb, diners, unionpay, maestro or unknown, from its first digits.
.last4stringThe last four digits, which are safe to show.

From KScript.Core

#card->reveal() → string

The whole number. Only use it to pass the card on to a payment provider; never store or log it.
Example
<let name="x" type="card" value="'4242 4242 4242 4242'" />
<echo>{ $x->reveal()->count() }</echo>
$x: card = '4242 4242 4242 4242'
echo $x->reveal()->count()

Methods from any