v3.0.0
⚠ BREAKING CHANGES
- version 3 has a bunch of changes to convert this lib into a more functional approach.
⚠️ BREAKING CHANGES
-
The way to use creditcard.js has been changed.
See the details...
Before:
var CreditCard = require('creditcard.js'); const c = new CreditCard(); c.isValid('4916108926268679'); c.isExpirationDateValid('02', '2027'); c.isSecurityCodeValid('4556603578296676', '250'); c.getCreditCardNameByNumber('4539578763621486');
And now:
import { isValid, isExpirationDateValid isSecurityCodeValid, getCreditCardNameByNumber } from 'creditcard.js' isValid('4916108926268679'); isExpirationDateValid('02', '2027'); isSecurityCodeValid('4916108926268679', '489'); getCreditCardNameByNumber('4916108926268679');
-
Removed bower support
-
Removed browser use support
See more details on website: https://contaazul.github.io/creditcard.js
Added
Changed
- Export functions instead of a constructor #78
- Change Karma to Jest for tests #77
- Change CI from Travis to Github Actions #105
- New website #110