Mixed

Various checks.

Methods

(inner) base64(value) → {boolean}

Check if is base64 encoded string

Interfaces: all, any, not

Source:
Parameters:
Name Type Description
value string

base64 string

Returns:
Type:
boolean
Example
be.base64('aGVsbG8=') // true

(inner) email(value) → {boolean}

Check if is valid email https://emailregex.com/ Interfaces: all, any, not

Source:
Parameters:
Name Type Description
value string

email

Returns:
Type:
boolean
Example
be.email('fabio@rica.li') // true
be.not.email('fabiorica.li') // true

(inner) equal(value, other) → {boolean}

Checks if equal

Interfaces: not

Source:
Parameters:
Name Type Description
value Number | String | Boolean | RegExp

first

other Number | String | Boolean | RegExp

second

Returns:
Type:
boolean
Example
be.equal('hello', 'hello') // true
be.equal('hello', 'hellow') // false
be.equal(true, 'true') // false

(inner) fiscalCodeIT(value) → {boolean}

Check if is an IT fiscal code

Interfaces: all, any, not

Source:
Parameters:
Name Type Description
value string

code string

Returns:
Type:
boolean
Example
be.fiscalCodeIT('OLEFBA97C64F158X') // true

(inner) hex(value) → {boolean}

Check if is a hexadecimal

Interfaces: all, any, not

Source:
Parameters:
Name Type Description
value string

hex string

Returns:
Type:
boolean
Example
be.hex('fff') // true

(inner) hexColor(value) → {boolean}

Check if is a hexadecimal color

Interfaces: all, any, not

Source:
Parameters:
Name Type Description
value string

hex color string

Returns:
Type:
boolean
Example
be.hexColor('#ff0000') // true

(inner) ipv(value) → {boolean}

Check if is a valid ip string

Interfaces: all, any, not

Source:
Parameters:
Name Type Description
value string

ip string

Returns:
Type:
boolean
Example
be.ipv('127.0.0.1') // true

(inner) ipv4(value) → {boolean}

Check if is a valid IPv4

Interfaces: all, any, not

Source:
Parameters:
Name Type Description
value string

ip string

Returns:
Type:
boolean
Example
be.ipv4('127.0.0.1') // true

(inner) ipv6(value) → {boolean}

Check if is a valid IPv6

Interfaces: all, any, not

Source:
Parameters:
Name Type Description
value string

ip string

Returns:
Type:
boolean
Example
be.ipv6('FF01:0:0:0:0:0:0:1') // true

(inner) macAddress(value) → {boolean}

Check if is a valid MAC address

Interfaces: all, any, not

Source:
Parameters:
Name Type Description
value string

MAC string

Returns:
Type:
boolean
Example
be.macAddress('3D:F2:C9:A6:B3:4F') // true

(inner) semVer(value) → {boolean}

Check if is a valid semver string

Interfaces: all, any, not

Source:
Parameters:
Name Type Description
value string

version string

Returns:
Type:
boolean
Example
be.semVer('1.0.0') // true