Skip to Content
🎲 RandBox へようこそ - 強力な JavaScript ランダムデータ生成ライブラリ! 詳細を見る

cc_type

// 使い方 randBox.cc_type() randBox.cc_type({raw: true})

ランダムなクレジットカードタイプを返します。

randBox.cc_type(); => 'Visa'

デフォルトでは名前のみ返します。オブジェクト全体(名前、略称、数字プレフィックス、長さ)を返すには、raw フラグを指定してください。

randBox.cc_type({raw: true}); => {name: 'Discover Card', short_name: 'discover', prefix: '6011', length: 16}

使用可能なタイプは以下の通りです(名前 - 略称):

  • American Express - amex
  • Bankcard - bankcard
  • China UnionPay - chinaunion
  • Diners Club Carte Blanche - dccarte
  • Diners Club enRoute - dcenroute
  • Diners Club International - dcintl
  • Diners Club United States & Canada - dcusc
  • Discover Card - discover
  • InstaPayment - instapay
  • JCB - jcb
  • Laser - laser
  • Maestro - maestro
  • Mastercard - mc
  • Solo - solo
  • Switch - switch
  • Visa - visa
  • Visa Electron - electron
最終更新日: