Swiftpack.co - barbarity/CreditCardFormatter as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by barbarity.
barbarity/CreditCardFormatter 0.1.0
A library for validating and formatting credit cards written in Swift
⭐️ 6
🕓 4 years ago
.package(url: "https://github.com/barbarity/CreditCardFormatter.git", from: "0.1.0")

CreditCardFormatter

A library for validating and formatting credit cards written in Swift.

Features

  • Credit card identifier.
  • Credit card formatter based on the type of the credit card.
  • Credit card number validator.
  • All major credit card brands available.
  • Possibility to add custom validators and formatters.

Requirements

  • iOS 10.0+
  • Xcode 10.2+
  • Swift 5+

Installation

CocoaPods

You can use CocoaPods to install CreditCardFormatter by adding it to your Podfile:

pod 'CreditCardFormatter', '~> 0.1.0'

Carthage

Create a Cartfile that lists the framework and run carthage update. Follow the instructions to add $(SRCROOT)/Carthage/Build/iOS/CreditCardFormatter.framework into your Xcode project.

github "barbarity/CreditCardFormatter", "0.1.0"

Swift Package Manager

Set up your Package.swift and add CreditCardFormatter to the dependencies value.

dependencies: [
    .package(url: "https://github.com/barbarity/CreditCardFormatter.git", from: "0.1.0")
]

Manually

TBD

Usage

TBD

Contribute

  • If you have a feature request or found a bug, open an issue here on Github and follow the instructions.
  • If you would like to contribute, feel free to open a pull request to this repository.

License

CreditCardFormatter is released under the MIT License. See LICENSE for details.

GitHub

link
Stars: 6
Last commit: 4 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

Release 0.1.0
4 years ago

First version of the formatter. It includes:

Funcitonality to validate and format the following credit cards:

  • American Express
  • China UnionPay
  • DinersClub International
  • Discover
  • JCB
  • Master Card
  • VISA

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics