danielberkompas / Number
Licence: mit
ActionView::Helpers::NumberHelper for Elixir
Stars: ✭ 186
Programming Languages
elixir
2628 projects
Labels
Projects that are alternatives of or similar to Number
Coherence
Coherence is a full featured, configurable authentication system for Phoenix
Stars: ✭ 1,207 (+548.92%)
Mutual labels: hex
Sqlitex
An Elixir wrapper around esqlite. Allows access to sqlite3 databases.
Stars: ✭ 111 (-40.32%)
Mutual labels: hex
Gradstop
JavaScript micro library to generate gradient color stops 🏳️🌈
Stars: ✭ 144 (-22.58%)
Mutual labels: hex
Phoenix gon
🔥 Phoenix variables in your JavaScript without headache.
Stars: ✭ 84 (-54.84%)
Mutual labels: hex
Multiverse
Elixir package that allows to add compatibility layers via API gateways.
Stars: ✭ 87 (-53.23%)
Mutual labels: hex
Bloomex
🌺 A pure Elixir implementation of Scalable Bloom Filters
Stars: ✭ 93 (-50%)
Mutual labels: hex
Xcodecolorsense
🎈 An Xcode plugin that makes working with color easier
Stars: ✭ 79 (-57.53%)
Mutual labels: hex
Colorhighlight
🎨 Lightweight Color Highlight colorizer for Sublime Text
Stars: ✭ 76 (-59.14%)
Mutual labels: hex
Material Palette Generator
🎨 Get perfect Material Design color palettes from any hex color.
Stars: ✭ 114 (-38.71%)
Mutual labels: hex
Jscolor
JavaScript color picker with opacity (alpha channel) and customizable palette. Single file of plain JS with no dependencies.
Stars: ✭ 182 (-2.15%)
Mutual labels: hex
Table rex
An Elixir app which generates text-based tables for display
Stars: ✭ 161 (-13.44%)
Mutual labels: hex
Number
Number
is an Elixir library which
provides functions to convert numbers into a variety of different formats.
Ultimately, it aims to be a partial clone of
ActionView::Helpers::NumberHelper
from Rails.
Number.Currency.number_to_currency(2034.46)
"$2,034.46"
Number.Phone.number_to_phone(1112223333, area_code: true, country_code: 1)
"+1 (111) 222-3333"
Number.Percentage.number_to_percentage(100, precision: 0)
"100%"
Number.Human.number_to_human(1234)
"1.23 Thousand"
Number.Delimit.number_to_delimited(12345678)
"12,345,678"
Installation
Get it from Hex:
defp deps do
[{:number, "~> 1.0.1"}]
end
Then run mix deps.get
.
Usage
If you want to import all of the functions provided by Number
, simply use
it in your module:
defmodule MyModule do
use Number
end
More likely, you'll want to import the functions you want from one of
Number
's submodules.
defmodule MyModule do
import Number.Currency
end
See the Hex documentation for more information
about the modules provided by Number
.
License
MIT. See LICENSE for more details.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].