inflex alternatives and similar packages
Based on the "Text and Numbers" category.
Alternatively, view inflex alternatives based on common mentions on social networks and blogs.
-
money
Working with Money safer, easier, and fun, interpretation of the Fowler's Money pattern. -
Ex_Money
Money arithmetic, conversion, serialisation with Ecto and exchange rate service integration. -
hashids
Hashids lets you obfuscate numerical identifiers via reversible mapping. -
number
Number is a pretentiously-named Elixir library which provides functions to convert numbers into a variety of different formats. -
slugger
Slugger can generate slugs from given strings that can be used in URLs or file names. -
nanoid
Elixir port of NanoID, a secure and URL-friendly unique ID generator. -
secure_random
Convenience library for random base64 strings modeled after my love for Ruby's SecureRandom. -
chinese_translation
Translate between traditional chinese and simplified chinese based on wikipedia data, and translate chinese words/characters to pinyin (or slug with or without tone). -
veritaserum
Sentiment analysis based on afinn-165, emojis and some enhancements. -
brcpfcnpj
Number format and Validate, to the documents brazilians (CPF/CNPJ). -
inet_cidr
Classless Inter-Domain Routing (CIDR) for Elixir that is compatible with :inet and supports both IPv4 and IPv6. -
haikunator
Generate Heroku-like memorable random names to use in your apps or anywhere else. -
Ex_Cldr_Numbers
CLDR-based Number and Currency Localization and Formatting -
mbcs
Wrapper for erlang-mbcs. This module provides functions for character encoding conversion. -
unit_fun
Attempt to add units to numbers in elixir to give some added type saftey when dealing with numeric quantities. -
mt940
MT940 (standard structured SWIFT Customer Statement message) parser for Elixir. -
Ex_Cldr_Units
SI Unit formatting, localisation, arithmetic and conversion based on the CLDR data -
bencode
A Bencode encoder and decoder for Elixir. The decoder will return the checksum value of the info dictionary, if an info dictionary was found in the input.
Scout APM - Leading-edge performance monitoring starting at $39/month
Do you think we are missing an alternative of inflex or a related project?
README
Inflex 
An Elixir library for handling word inflections.
Getting Started
You can add Inflex as a dependency in your mix.exs
file. Since it only requires Elixir and Erlang there are no other dependencies.
def deps do
[ { :inflex, "~> 2.0.0" } ]
end
If you are not using hex you can add the dependency using the github repo.
def deps do
[ { :inflex, github: "nurugger07/inflex" } ]
end
Then run mix deps.get
in the shell to fetch and compile the dependencies.
To incorporate Inflex in your modules, use import
.
defmodule Blog do
import Inflex
def greeting(count), do: "You are the #{ordinalize(count)} visitor!"
end
Examples
Singularize & Pluralize
Here are some basic examples from iex
:
iex(1)> Inflex.singularize("dogs")
"dog"
iex(2)> Inflex.pluralize("dog")
"dogs"
iex(3)> Inflex.singularize("people")
"person"
iex(4)> Inflex.pluralize("person")
"people"
Some other special cases are handled for nouns ending in -o and -y
iex(1)> Inflex.pluralize("piano")
"pianos"
iex(2)> Inflex.pluralize("hero")
"heroes"
iex(3)> Inflex.pluralize("butterfly")
"butterflies"
iex(4)> Inflex.pluralize("monkey")
"monkeys"
Inflect
iex(1)> Inflex.inflect("child", 1)
"child"
iex(2)> Inflex.inflect("child", 2)
"children"
Camelize & Pascalize
Inflex also camelizes or pascalizes strings and atoms.
iex(1)> Inflex.camelize(:upper_camel_case)
"UpperCamelCase"
iex(2)> Inflex.camelize("pascal-case", :lower)
"pascalCase"
Parameterize
Strings can be parameterized easily.
iex(1)> Inflex.parameterize("String for parameter")
"string-for-parameter"
iex(2)> Inflex.parameterize("String with underscore", "_")
"string_with_underscore"
Underscore
Makes an underscored, lowercase form from a string or atom.
iex(1)> Inflex.underscore("UpperCamelCase")
"upper_camel_case"
iex(2)> Inflex.underscore("pascalCase")
"pascal_case"
iex(3)> Inflex.underscore(UpperCamelCase)
"upper_camel_case"
iex(4)> Inflex.underscore(:pascalCase)
"pascal_case"
Contributing
All pull requests will be reviewed for inclusion but must include tests.