Internet
Module to generate internet related entries.Overview
For user accounts, you may need an {{$internet.email}}
and a {{$internet.password}}
, as well as a ASCII {{$internet.userName}}
or Unicode {{$internet.displayName}}
. Since the emails generated could coincidentally be real email addresses, you should not use these for sending real email addresses. If this is a concern, use {{$internet.exampleEmail}}
instead.For websites, you can generate a {{$internet.domainName}}
or a full {{$internet.url}}
.To make your data more 🔥, you can use {{$internet.emoji}}
.You also have access to a number of the more technical elements of web requests, such as {{$internet.httpMethod}}
, {{$internet.httpStatusCode}}
, {{$internet.ip}}
, {{$internet.mac}}
, {{$internet.userAgent}}
, and {{$internet.port}}
.
color#
Generates a random css hex color code in aesthetically pleasing color palette.Name | Type | Default | Description |
---|
blueBase | number | 0 | The optional base blue in range between 0 and 255 . |
greenBase | number | 0 | The optional base green in range between 0 and 255 . |
redBase | number | 0 | The optional base red in range between 0 and 255 . |
displayName#
Generates a display name using the given person's name as base. The resulting display name may use one or both of the provided names. If the input names include Unicode characters, the resulting display name will contain Unicode characters. It will not contain spaces.Name | Type | Default | Description |
---|
firstName | string | {{$person.firstName}} | The optional first name to use. |
lastName | string | {{$person.lastName}} | The optional last name to use. |
domainName#
Generates a random domain name.
domainSuffix#
Returns a random domain suffix.
domainWord#
Generates a random domain word.
email#
Generates an email address using the given person's name as base.Name | Type | Default | Description |
---|
allowSpecialCharacters | boolean | false | Whether special characters such as .!#$%&'*+ should be included in the email address. |
firstName | string | {{$person.firstName}} | The optional first name to use. |
lastName | string | {{$person.lastName}} | The optional last name to use. |
provider | string | | The mail provider domain to use. If not specified, a random free mail provider will be chosen. |
emoji#
Generates a random emoji.
exampleEmail#
Generates an email address using an example mail provider using the given person's name as base.Name | Type | Default | Description |
---|
allowSpecialCharacters | boolean | false | Whether special characters such as .!#$%&'*+ should be included in the email address. |
firstName | string | {{$person.firstName}} | The optional first name to use. |
lastName | string | {{$person.lastName}} | The optional last name to use. |
httpMethod#
Returns a random http method.Can be either of the following:Returns: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH'
httpStatusCode#
Generates a random HTTP status code.
Generates a random IPv4 or IPv6 address.
ip4#
Generates a random IPv4 address.
ip6#
Generates a random IPv6 address.
mac#
Generates a random mac address.Name | Type | Default | Description |
---|
separator | string | : | The optional separator to use. Can be either ':' , '-' or '' . |
password#
Generates a random password-like string. Do not use this method for generating actual passwords for users. Since the source of the randomness is not cryptographically secure, neither is this generator.Name | Type | Default | Description |
---|
length | number | 15 | The length of the password to generate. |
memorable | boolean | false | Whether the generated password should be memorable. |
pattern | RegExp | /\w/ | The pattern that all chars should match. This option will be ignored, if memorable is true . |
prefix | string | | The prefix to use. |
password#
Generates a random port number.
protocol#
Returns a random web protocol. Either http
or https
.Returns: 'http' | 'https'
url#
Generates a random http(s) url.Name | Type | Default | Description |
---|
appendSlash | boolean | {{$datatype.boolean}} | Whether to append a slash to the end of the url (path). |
protocol | HTTPProtocolType | https | The protocol to use. |
| | | |
Returns: string | | | |
userAgent#
Generates a random user agent string.
userName#
Generates a username using the given person's name as base. The resulting username may use neither, one or both of the names provided. This will always return a plain ASCII string. Some basic stripping of accents and transliteration of characters will be done.Name | Type | Default | Description |
---|
firstName | string | {{$person.firstName}} | The optional first name to use. |
lastName | string | {{$person.lastName}} | The optional last name to use. |
Modified at 2024-08-30 09:44:01