View Source Exfake (Exfake v2.3.0)
Documentation for Exfake.
Link to this section Summary
Functions
Generates a random boolean.
Generates a random company BS goals.
Generates a random company catch phrase.
Returns a random US city name.
Generates a random company name.
Generates a random company suffix.
Returns a random country name.
Generates a random Luhn-valid credit card number (15–16 digits).
Returns a random credit card type name.
Returns a random currency which represented in few format.
Generates a random domain.
Generates a random email.
Generates a random file name with an extension matching a random MIME type.
Generates first name.
Generates a random float between min and max.
Generates a full US address combining street, city, state, and ZIP.
Generates a random Date in the future, within the given number of days.
Generates a random hex color code.
Generates a random HTTP code.
Generates a random integer between min and max (inclusive).
Generates a random IPv4 address.
Generates a random IPv6 address.
Generates a random language code.
Generates last name.
Generates a random MAC address.
Returns a random MIME type string.
Generates random lorem paragraph with specified sentence count and sentence words count which randoms between 2 and 5. Sentence count must be greater than 0. Default sentence count is 3. Default words count between 2 and 5.
Generates a random password of the given length (default 12).
Generates a random Date in the past, within the given number of days.
Generates first name + last name combination.
Generates phone number which formatted randomly.
Generates a random price rounded to 2 decimal places.
Generates random english sentence with specified words count. Words count must be greater than 1. Default words count is 5.
Returns a random US state name.
Returns a random US state abbreviation.
Generates a random US street address.
Generates a random URL.
Returns a random browser User-Agent string.
Generates a random username in the form word_wordN.
Generates a random UUID v4.
Generates random english word.
Generates a random XSS file.
Generates a random XSS string.
Generates a random USA zip code.
Link to this section Functions
@spec boolean() :: boolean()
Generates a random boolean.
examples
Examples
iex> Exfake.boolean()
true
@spec bs() :: String.t()
Generates a random company BS goals.
examples
Examples
iex> Exfake.bs()
"reintermediate granular niches"
iex> Exfake.bs()
"unleash user-centric markets"
@spec catch_phrase() :: String.t()
Generates a random company catch phrase.
examples
Examples
iex> Exfake.catch_phrase()
"Re-engineered maximized productivity"
iex> Exfake.catch_phrase()
"Right-sized hybrid complexity"
@spec city() :: String.t()
Returns a random US city name.
examples
Examples
iex> Exfake.city()
"Denver"
@spec company_name() :: String.t()
Generates a random company name.
examples
Examples
iex> Exfake.company_name()
"Klein, Mueller and Windler"
iex> Exfake.company_name()
"Zion Kerluke LLC"
iex> Exfake.company_name()
"Legros-Yundt"
@spec company_suffix() :: String.t()
Generates a random company suffix.
examples
Examples
iex> Exfake.company_suffix()
"Inc"
iex> Exfake.company_suffix()
"LLC"
@spec country() :: String.t()
Returns a random country name.
examples
Examples
iex> Exfake.country()
"Germany"
@spec credit_card_number() :: String.t()
Generates a random Luhn-valid credit card number (15–16 digits).
examples
Examples
iex> Exfake.credit_card_number()
"4532015112830366"
@spec credit_card_type() :: String.t()
Returns a random credit card type name.
examples
Examples
iex> Exfake.credit_card_type()
"Visa"
@spec currency() :: [String.t(), ...]
Returns a random currency which represented in few format.
examples
Examples
iex> Exfake.currency()
["Costa Rica Colon", "CRC", "₡"]
iex> Exfake.currency()
["Japan Yen", "JPY", "¥"]
iex> Exfake.currency()
["Liberia Dollar", "LRD", "$"]
@spec date() :: Date.t()
Generates a random Date within ±10 years of today.
examples
Examples
iex> Exfake.date()
~D[2023-07-14]
@spec domain() :: String.t()
Generates a random domain.
examples
Examples
iex> Exfake.domain()
"www.laboriosam.me"
iex> Exfake.domain()
"www.nihil.biz"
@spec email() :: String.t()
Generates a random email.
examples
Examples
iex> Exfake.email()
"dallas@gmail.com"
iex> Exfake.email()
"miller@hotmail.com"
@spec file_name() :: String.t()
Generates a random file name with an extension matching a random MIME type.
examples
Examples
iex> Exfake.file_name()
"river.pdf"
@spec first_name() :: String.t()
Generates first name.
examples
Examples
iex> Exfake.first_name()
"Jake"
iex> Exfake.first_name()
"Rosemary"
Generates a random float between min and max.
examples
Examples
iex> Exfake.float(1.0, 5.0)
3.14
@spec full_address() :: String.t()
Generates a full US address combining street, city, state, and ZIP.
examples
Examples
iex> Exfake.full_address()
"742 Elm Street, Denver, CO 80201"
@spec future_date(pos_integer()) :: Date.t()
Generates a random Date in the future, within the given number of days.
examples
Examples
iex> Exfake.future_date()
~D[2026-09-17]
iex> Exfake.future_date(30)
~D[2026-06-10]
@spec hex_color() :: String.t()
Generates a random hex color code.
examples
Examples
iex> Exfake.hex_color()
"#A3F2C1"
@spec http_code() :: non_neg_integer()
Generates a random HTTP code.
examples
Examples
iex> Exfake.http_code()
308
iex> Exfake.http_code()
201
iex> Exfake.http_code(:info)
102
iex> Exfake.http_code(:server_error)
503
@spec http_code(:client_error | :info | :redirection | :server_error | :success) :: non_neg_integer()
Generates a random integer between min and max (inclusive).
examples
Examples
iex> Exfake.integer(1, 10)
7
@spec ipv4() :: String.t()
Generates a random IPv4 address.
examples
Examples
iex> Exfake.ipv4()
"145.77.91.223"
iex> Exfake.ipv4()
"17.94.49.5"
@spec ipv6() :: String.t()
Generates a random IPv6 address.
examples
Examples
iex> Exfake.ipv6()
"BCB6:C612:24B1:D067:3B27:B8BC:187A:9CCB"
iex> Exfake.ipv6()
"90A1:238:65DD:EC7F:CF3A:1AB0:B2DE:C8A3"
@spec language_code() :: String.t()
Generates a random language code.
examples
Examples
iex> Exfake.language_code()
"gv"
iex> Exfake.language_code()
"ne"
@spec last_name() :: String.t()
Generates last name.
examples
Examples
iex> Exfake.last_name()
"Nitzsche"
iex> Exfake.last_name()
"Adams"
@spec mac() :: String.t()
Generates a random MAC address.
examples
Examples
iex> Exfake.mac()
"A1:0B:4F:C3:29:7E"
iex> Exfake.mac()
"00:FF:12:AB:44:C8"
@spec mime_type() :: String.t()
Returns a random MIME type string.
examples
Examples
iex> Exfake.mime_type()
"image/png"
@spec paragraphs(pos_integer(), pos_integer()) :: String.t()
Generates random lorem paragraph with specified sentence count and sentence words count which randoms between 2 and 5. Sentence count must be greater than 0. Default sentence count is 3. Default words count between 2 and 5.
examples
Examples
iex> Exfake.paragraphs()
"Statement waste mind. Verse sugar answer adjustment behavior. Soup attempt."
iex> Exfake.paragraphs(3, 2)
"Smoke ink. Cry day. Company stop."
iex> Exfake.paragraphs(3, 2)
"Nation wind. Sea stone. Minute comparison."
@spec password(pos_integer()) :: String.t()
Generates a random password of the given length (default 12).
examples
Examples
iex> Exfake.password()
"aB3!xZ9@kL2#"
iex> Exfake.password(20)
"Xk3!mZ9@aB2#qR5&wT1%"
@spec past_date(pos_integer()) :: Date.t()
Generates a random Date in the past, within the given number of days.
examples
Examples
iex> Exfake.past_date()
~D[2025-11-03]
iex> Exfake.past_date(30)
~D[2026-04-28]
@spec person() :: String.t()
Generates first name + last name combination.
examples
Examples
iex> Exfake.person()
"Jake Nitzsche"
iex> Exfake.person()
"Luciano Eichmann"
@spec phone_number() :: String.t()
Generates phone number which formatted randomly.
examples
Examples
iex> Exfake.phone_number()
"684-126-0269"
iex> Exfake.phone_number()
"1-319-098-3384 x06095"
Generates a random price rounded to 2 decimal places.
examples
Examples
iex> Exfake.price()
249.99
iex> Exfake.price(5.0, 20.0)
14.37
@spec sentence(pos_integer()) :: String.t()
Generates random english sentence with specified words count. Words count must be greater than 1. Default words count is 5.
examples
Examples
iex> Exfake.sentence()
"Judge taste page porter harmony."
iex> Exfake.sentence(3)
"Event minute view."
@spec state() :: String.t()
Returns a random US state name.
examples
Examples
iex> Exfake.state()
"California"
@spec state_abbr() :: String.t()
Returns a random US state abbreviation.
examples
Examples
iex> Exfake.state_abbr()
"CA"
@spec street_address() :: String.t()
Generates a random US street address.
examples
Examples
iex> Exfake.street_address()
"742 Elm Street"
@spec url() :: String.t()
Generates a random URL.
examples
Examples
iex> Exfake.url()
"http://www.roll.me"
iex> Exfake.url()
"https://www.front.com"
@spec user_agent() :: String.t()
Returns a random browser User-Agent string.
examples
Examples
iex> Exfake.user_agent()
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 ..."
@spec username() :: String.t()
Generates a random username in the form word_wordN.
examples
Examples
iex> Exfake.username()
"mountain_river42"
@spec uuid() :: String.t()
Generates a random UUID v4.
examples
Examples
iex> Exfake.uuid()
"f47ac10b-58cc-4372-a567-0e02b2c3d479"
@spec word() :: String.t()
Generates random english word.
examples
Examples
iex> Exfake.word()
"burn"
iex> Exfake.word()
"language"
@spec xss_file() :: String.t()
Generates a random XSS file.
examples
Examples
iex> Exfake.xss_file()
"<TABLE><TD BACKGROUND="javascript:alert('XSS')">.txt"
iex> Exfake.xss_file()
"<IMG SRC="javascript:alert('XSS');">.txt"
@spec xss_string() :: String.t()
Generates a random XSS string.
examples
Examples
iex> Exfake.xss_string()
"<BODY BACKGROUND="javascript:alert('XSS')">"
iex> Exfake.xss_string()
"<A HREF="http://0102.0146.0007.00000223/">XSS</A>"
@spec zip_code() :: String.t()
Generates a random USA zip code.
examples
Examples
iex> Exfake.zip_code()
"32107-6766"
iex> Exfake.zip_code()
"91527"