Code Monkey home page Code Monkey logo

currencytext's Introduction

Build status Coverate status Swift Platform Swift Package Manager CocoaPods Compatible Twitter

CurrencyText provides lightweight libraries for formating text field text as currency, available for both UIKit and SwiftUI.

Its main core, the CurrencyFormatter class, can also be used a part from text fields to format any value that can be monetary represented.

If you need to present currency formatted text or allow users to input currency data, CurrencyText is going to help you do it in a readable and configurable matter.

Documentation

For details on how to use CurrencyText libraries please refer to the docs.

Installation

Swift Package Manager

To install it using Swift Package Manager, just add this repository through Xcode built-in Swift Packages, or by manually adding it to your Package.swift Package's dependencies:

dependencies: [
    .package(
    	url: "https://github.com/marinofelipe/CurrencyText.git", 
    	.upToNextMinor(from: .init(2, 1, 0)
    )
]

.target(
    name: "MyTarget",
    dependencies: [
    	// Can be imported to consume the formatter in insolation
        .target(name: "CurrencyFormatter"),

        // UIKit library - Provide access to "CurrencyFormatter" and "CurrencyUITextFieldDelegate" targets
        .target(name: "CurrencyText"),

        // SwiftUI library - Provide access to "CurrencyFormatter" and "CurrencyTextField" targets
        .target(name: "CurrencyTextSwiftUI")
    ],
    ...
)

Install via CocoaPods

To integrate CurrencyText using CocoaPods, specify it, one or more of its sub-specs in your Podfile:

# Podfile
use_frameworks!

target 'YOUR_TARGET_NAME' do
     pod 'CurrencyText'

     # sub-specs

     # pod 'CurrencyText/CurrencyFormatter'
     # pod 'CurrencyText/CurrencyUITextField'
     # pod 'CurrencyText/CurrencyTextField'
end

Contributing

Contributions and feedbacks are always welcome. Please feel free to fork, follow, open issues and pull requests. The issues, milestones, and what we are currently working on can be seen in the main Project.

Special Thanks

To @malcommac for his awesome work with SwiftRichString and SwiftDate, that inspired me when creating this project. Also to myanalysis for contributing so much by finding issues and giving nice suggestions.

Copyright

CurrencyText is released under the MIT license. See LICENSE for details.

Felipe Marino: [email protected], @_marinofelipe

currencytext's People

Contributors

marinofelipe avatar cgkarnlund avatar dependabot[bot] avatar renatomedina avatar andrewsb avatar spencerprescott avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.