├── CHANGELOG.md ├── .eslintignore ├── .github └── PULL_REQUEST_TEMPLATE.md ├── .npmignore ├── .gitignore ├── config ├── .eslintrc ├── banner.js ├── build.js ├── entry.js └── bundle.js ├── .eslintrc ├── webpack.config.js ├── dist ├── README.md ├── vue-credit-card-validation.min.js ├── vue-credit-card-validation.esm.js ├── vue-credit-card-validation.common.js └── vue-credit-card-validation.js ├── LICENSE ├── src ├── index.js ├── cards.js ├── format.js ├── validation.js └── utils.js ├── example ├── demo.css └── index.html ├── package.json └── README.md /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | config/*.js 2 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .* 2 | *.log 3 | *.swp 4 | *.yml 5 | coverage 6 | docs/_book 7 | config 8 | dist/*.map 9 | lib 10 | test 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | lib 2 | coverage 3 | dist/*.gz 4 | docs/_book 5 | test/e2e/report 6 | test/e2e/screenshots 7 | node_modules 8 | .DS_Store 9 | *.log 10 | *.swp 11 | *~ 12 | -------------------------------------------------------------------------------- /config/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "globals": { 3 | "process": true 4 | }, 5 | "extends": "vue", 6 | "rules": { 7 | "no-multiple-empty-lines": [2, {"max": 2}], 8 | "no-console": 0 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": [ 4 | "plugin:vue-libs/recommended" 5 | ], 6 | "rules": { 7 | "object-curly-spacing": ["error", "always"], 8 | "no-multiple-empty-lines": ["error", { "max": 2, "maxBOF": 1 }],transforms: { forOf: false } 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /config/banner.js: -------------------------------------------------------------------------------- 1 | const pack = require('../package.json') 2 | const version = process.env.VERSION || pack.version 3 | 4 | module.exports = 5 | '/*!\n' + 6 | ` * ${pack.name} v${version} \n` + 7 | ` * (c) ${new Date().getFullYear()} ${pack.author.name}\n` + 8 | ` * Released under the ${pack.license} License.\n` + 9 | ' */' 10 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | // webpack.config.js 2 | const { VueLoaderPlugin } = require('vue-loader') 3 | 4 | module.exports = { 5 | module: { 6 | rules: [ 7 | // ... other rules 8 | { 9 | test: /\.vue$/, 10 | loader: 'vue-loader' 11 | } 12 | ] 13 | }, 14 | plugins: [ 15 | // make sure to include the plugin! 16 | new VueLoaderPlugin() 17 | ] 18 | } -------------------------------------------------------------------------------- /config/build.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs') 2 | const exist = fs.existsSync 3 | const mkdir = fs.mkdirSync 4 | const getAllEntries = require('./entry').getAllEntries 5 | const build = require('./bundle') 6 | 7 | if (!exist('dist')) { 8 | mkdir('dist') 9 | } 10 | 11 | let entries = getAllEntries() 12 | 13 | // filter entries via command line arg 14 | if (process.argv[2]) { 15 | const filters = process.argv[2].split(',') 16 | entries = entries.filter(b => { 17 | return filters.some(f => b.dest.indexOf(f) > -1) 18 | }) 19 | } 20 | 21 | build(entries) 22 | -------------------------------------------------------------------------------- /dist/README.md: -------------------------------------------------------------------------------- 1 | ## Explanation of Build Files 2 | 3 | - UMD: vue-stripe-payment.js 4 | - CommonJS: vue-stripe-payment.common.js 5 | - ES Module: vue-stripe-payment.esm.js 6 | 7 | ### Terms 8 | 9 | - **[UMD](https://github.com/umdjs/umd)**: UMD builds can be used directly in the browser via a ` 12 | 13 | 14 | 15 | 16 |
17 |{{ cardBrand }}{{ cardBrandClass }}{{ cardNumber }}{{ cardExpiry }}| Card Number | 114 |Brand | 115 |
|---|---|
| 4242 4242 4242 4242 | 120 |Visa | 121 |
| 5555 5555 5555 4444 | 124 |Mastercard | 125 |
| 3782 822463 10005 | 128 |Am Ex | 129 |
| 6011 1111 1111 1117 | 132 |Discover | 133 |
| 3056 9309 0259 04 | 136 |Diners Club | 137 |
| 3566 0020 2036 0505 | 140 |JCB | 141 |
| 6200 0000 0000 0005 | 144 |UnionPay | 145 |
155 | View on Github 156 |
157 |