模块概览#
如需随机金额,请使用 {{$finance.amount}}。如需传统银行账户相关方法,请使用:{{$finance.accountNumber}}、{{$finance.accountName}}、{{$finance.bic}}、{{$finance.iban}}、{{$finance.pin}} 和 {{$finance.routingNumber}}。如需信用卡相关方法,请使用:{{$finance.creditCardNumber}}、{{$finance.creditCardCVV}}、{{$finance.creditCardIssuer}}、{{$finance.transactionDescription}} 和 {{$finance.transactionType}}。如需区块链相关方法,请使用:{{$finance.bitcoinAddress}}、{{$finance.ethereumAddress}} 和 {{$finance.litecoinAddress}}。
accountName#
accountNumber#
| 名称 | 类型 | 默认值 | 描述 |
|---|
| length | number | 8 | 账号的长度。 |
amount#
| 名称 | 类型 | 默认值 | 描述 |
|---|
| autoFormat | boolean | false | |
| dec | number | 2 | 金额的小数位数。 |
| max | number | 1000 | 金额的上限。 |
| min | number | 0 | 金额的下限。 |
| symbol | string | '' | 用于作为金额前缀的符号。 |
bic#
基于 ISO-9362 格式生成随机 SWIFT/BIC 代码。| 名称 | 类型 | 默认值 | 描述 |
|---|
| includeBranchCode | boolean | {{$datatype.boolean}} | 是否在生成的代码末尾包含三位分行代码。 |
bitcoinAddress#
| 名称 | 类型 | 默认值 | 描述 |
|---|
| network | 'mainnet' | 'testnet' | mainnet | 比特币网络('mainnet' 或 'testnet')。 |
| type | 'legacy' | 'segwit' | 'bech32' | 'taproot'| faker.helpers.arrayElement(['legacy','sewgit','bech32','taproot']) | 比特币地址类型('legacy'、'sewgit'、'bech32' 或 'taproot')。 | |
creditCardCVV#
creditCardIssuer#
creditCardNumber#
| 名称 | 类型 | 默认值 | 描述 |
|---|
| issuer | string | | 发卡机构名称(不区分大小写)或用于生成号码的格式。 |
currencyCode#
返回随机货币代码。(货币的短文本/缩写,例如 US Dollar -> USD)
currencyName#
currencySymbol#
ethereumAddress#
如需生成带校验和的 Ethereum 地址(具有特定的逐字符大小写),请将此方法包装在自定义方法中,并使用第三方库转换结果。
iban#
| 名称 | 类型 | 默认值 | 描述 |
|---|
| countryCode | string | | 你希望用于生成 IBAN 的国家/地区代码;如果未提供,则会使用随机国家/地区。 |
| formatted | boolean | false | 返回生成的 IBAN 的格式化版本。 |
maskedNumber#
| 名称 | 类型 | 默认值 | 描述 |
|---|
| ellipsis | boolean | true | 是否在数字前添加省略号。 |
| length | number | 4 | 未掩码数字的长度。 |
| parens | boolean | true | 是否使用包围括号。 |
pin#
| 名称 | 类型 | 默认值 | 描述 |
|---|
| length | number | 4 | 要生成的 PIN 的长度。 |
routingNumber#
transactionDescription#
transactionType#
Modified at 2026-06-09 08:55:47