casedcreditcardnames
v1.0.1
Published
Change "mastercard" to "MasterCard" and so on.
Downloads
2
Readme
casedcreditcardnames
Transfor "visa" to "Visa" and "mastercard" to "Mastercard"
The Zuora API expects the names of creditcards in a certain casing. This provides a mapping from lowercase to their correctly cased pendants.
Install
npm install casedcreditcardnames
Usage
var ccCasedName = require("casedcreditcardnames");
assert.equal(ccToCased("visa"), "Visa", "Visa is a CreditCardName");
assert.equal(ccToCased("mastercard"), "MasterCard", "MasterCard is a CreditCardName");
assert.equal(ccToCased("foo"), "foo", "foo is not a CreditCardName");
assert.equal(ccToCased(), undefined, "undefined is undefined");