Popularity
4.9
Declining
Activity
0.0
Stable
24
2
1
Programming language: Crystal
Tags:
Misc
moola alternatives and similar shards
Based on the "Misc" category.
Alternatively, view moola alternatives based on common mentions on social networks and blogs.
-
sentry
Build/Runs your crystal application, watches files, and rebuilds/restarts app on file changes -
immutable
Thread-safe, persistent, immutable collections for the Crystal language -
cron_scheduler
Simple job scheduler with crontab patterns for Crystal Language. -
inflector.cr
Inflector shard for Crystal. A port of ActiveSupport::Inflector -
crystal-web-framework-stars
⭐️ Web frameworks for Crystal, most starred on Github -
kreal
Kreal is a model sharing & RPC library built on and works with Kemal seamlessly. -
aasm.cr
:arrows_clockwise: Easy to use finite state machine for Crystal classes -
ulid
Universally Unique Lexicographically Sortable Identifier (ULID) in Crystal -
CrSerializer
Extensible annotation based serialization/deserialization library -
burocracia.cr
No dependency Crystal shard to validate, generate and format Brazilian burocracias such as CPF, CNPJ and CEP -
circuit_breaker
Implementation of the circuit breaker pattern in crystal -
wikicr
Wiki in crystal, using Markdown and Git, inspired by dokuwiki. Last features to build are pretty hard, if you have some time to help... :) -
m3u8
Generate and parse m3u8 playlists for HTTP Live Streaming (HLS) in Crystal. -
message_verifier.cr
Rails compatible MessageVerifier for Crystal-lang apps -
defined
This shard provides facilities for checking whether a constant exists at compile time, and for a variety of different conditional compilation options. Code can be conditionally compiled based on the existence of a constant, version number constraints, or whether an environment variable is set truthy or not. -
turkish-number
turn integers into the Turkish words for Crystal Language
Less time debugging, more time building
Scout APM allows you to find and fix performance issues with no hassle. Now with error monitoring and external services monitoring, Scout is a developer's best friend when it comes to application development.
Promo
scoutapm.com
Do you think we are missing an alternative of moola or a related project?
README
Moola
A Crystal library for dealing with money (inspired by RubyMoney)
Installation
tested with Crystal 0.28.0
Add this to your application's shard.yml
:
dependencies:
moola:
github: dorkrawk/moola
Usage
Basic Money object
money = Moola.new(42_00) # creates a new Moola::Money object
money.format # "$42.00"
money.cents # 4200
money.zero? # false
money.to_f # 42.0
-money == Moola.new(-42_00) # true
Comparisons
Moola::Money.new(5_00) == Moola::Money.new(5_00) # true
Moola::Money.new(5_00) == Moola::Money.new(7_00) # false
Moola::Money.new(5_00, "USD") == Moola::Money.new(5_00, "EUR") # false
[Moola::Money.new(5_00), Moola::Money.new(2_00), Moola::Money.new(7_00)].sort # sorted by amount
Arithmetic
Moola::Money.new(5_00) + Moola::Money.new(10_00) == Moola::Money.new(15_00)
Moola::Money.new(15_00) + Moola::Money.new(12_00) == Moola::Money.new(3_00)
Moola::Money.new(15_00) / 3 == Moola::Money.new(5_00)
Moola::Money.new(5_00) * 3 == Moola::Money.new(15_00)
Conversion
Moola::Exchange.add_conversion(Moola::Currency.find("usd"), Moola::Currency.find("cad"), 1.3)
money = Moola.new(1_00, "USD")
money.convert_to(Moola::Currency.find("cad")) == Moola.new(1_30, "cad")
Testing
# from the project root...
crystal spec