View Source Exfake (Exfake v2.4.0)

Documentation for Exfake.

Link to this section Summary

Functions

Returns a random ABO/Rh blood type.

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 Date within ±10 years of today.

Generates a random UTC DateTime.

Generates a random domain.

Generates a random email.

Returns a random emoji.

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 hashtag built from an English word.

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.

Returns a random job title.

Generates a random language code.

Generates last name.

Generates a random license plate in LLL-DDDD format.

Generates a random MAC address.

Returns a random MIME type string.

Returns a random name prefix.

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.

Returns a random TCP/UDP port number (1–65535).

Generates a random price rounded to 2 decimal places.

Returns a random RGB color as a {red, green, blue} tuple.

Generates a random semantic version string.

Generates random english sentence with specified words count. Words count must be greater than 1. Default words count is 5.

Generates a random URL slug.

Generates a random US Social Security Number in XXX-XX-XXXX format.

Returns a random US state name.

Returns a random US state abbreviation.

Generates a random US street address.

Generates a random US Employer Identification Number in XX-XXXXXXX format.

Generates a random Time.

Returns a random IANA timezone name.

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 blood_type() :: String.t()

Returns a random ABO/Rh blood type.

examples

Examples

iex> Exfake.blood_type()
"O+"
@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 datetime() :: DateTime.t()

Generates a random UTC DateTime.

examples

Examples

iex> Exfake.datetime()
#DateTime<2023-07-14 14:32:07Z>
@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 emoji() :: String.t()

Returns a random emoji.

examples

Examples

iex> Exfake.emoji()
"🚀"
@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"
@spec float(number(), number()) :: float()

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"
Link to this function

future_date(days \\ 365)

View Source
@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 hashtag() :: String.t()

Generates a random hashtag built from an English word.

examples

Examples

iex> Exfake.hashtag()
"#language"
@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()
@spec integer(integer(), integer()) :: 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 job_title() :: String.t()

Returns a random job title.

examples

Examples

iex> Exfake.job_title()
"Senior Software Engineer"
@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 license_plate() :: String.t()

Generates a random license plate in LLL-DDDD format.

examples

Examples

iex> Exfake.license_plate()
"ABC-1234"
@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 name_prefix() :: String.t()

Returns a random name prefix.

examples

Examples

iex> Exfake.name_prefix()
"Dr."
Link to this function

paragraphs(n \\ 3, limit \\ 5)

View Source
@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"
@spec port() :: 1..65535

Returns a random TCP/UDP port number (1–65535).

examples

Examples

iex> Exfake.port()
8080
Link to this function

price(min \\ 1.0, max \\ 1000.0)

View Source
@spec price(number(), number()) :: float()

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 rgb_color() :: {0..255, 0..255, 0..255}

Returns a random RGB color as a {red, green, blue} tuple.

examples

Examples

iex> Exfake.rgb_color()
{163, 242, 193}
@spec semver() :: String.t()

Generates a random semantic version string.

examples

Examples

iex> Exfake.semver()
"2.14.3"
@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 slug() :: String.t()

Generates a random URL slug.

examples

Examples

iex> Exfake.slug()
"mountain-river-42"
@spec ssn() :: String.t()

Generates a random US Social Security Number in XXX-XX-XXXX format.

examples

Examples

iex> Exfake.ssn()
"078-05-1120"
@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 tax_id() :: String.t()

Generates a random US Employer Identification Number in XX-XXXXXXX format.

examples

Examples

iex> Exfake.tax_id()
"12-3456789"
@spec time() :: Time.t()

Generates a random Time.

examples

Examples

iex> Exfake.time()
~T[14:32:07]
@spec timezone() :: String.t()

Returns a random IANA timezone name.

examples

Examples

iex> Exfake.timezone()
"America/New_York"
@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"