Popularity
4.9
Stable
Activity
0.0
Stable
23
3
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 -
crystal-web-framework-stars
โญ๏ธ Web frameworks for Crystal, most starred on Github -
cron_scheduler
Simple job scheduler with crontab patterns for Crystal Language. -
inflector.cr
Inflector shard for Crystal. A port of ActiveSupport::Inflector -
aasm.cr
:arrows_clockwise: Easy to use finite state machine for Crystal classes -
kreal
Kreal is a model sharing & RPC library built on and works with Kemal seamlessly. -
ulid
Universally Unique Lexicographically Sortable Identifier (ULID) in Crystal -
CrSerializer
Extensible annotation based serialization/deserialization library -
circuit_breaker
Implementation of the circuit breaker pattern in crystal -
burocracia.cr
๐ Zero-dependency Crystal shard to validate, generate and format Brazilian burocracias (CPF, CNPJ, CEP) -
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.
WorkOS - The modern identity platform for B2B SaaS
The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Promo
workos.com
Do you think we are missing an alternative of moola or a related project?
Popular Comparisons
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