ish.type.uuid

Universally Unique Identifier (UUID)-based type functionality.

Source:

Methods

[mixin] ish.type.uuid.base64(vValueopt) → {string}

Source:
Encodes and decodes Universally Unique Identifiers (UUID) in Base64.
From Mixin: ish.type-ex.js must be included for ishJS to access this functionality.
Parameters:
Name Type Attributes Default Description
vValue variant <optional>
ish.type.uuid() Value representing a standard UUID to be returned as a Base64 encoded UUID or a Base64 encoded UUID to be returned as a standard UUID.
Returns:
Type Description
string Value representing a new Base64 encoded UUID, the passed UUID in Base64, the passed Base64 encoded UUID as a standard UUID or a null-string if the passed UUID was not recognized.

[mixin] ish.type.uuid.format(x, bUppercaseopt) → {object}

Source:
Removes any non-canonical brackets (e.g. {}) from the passed value.
From Mixin: ish.type-ex.js must be included for ishJS to access this functionality.
Parameters:
Name Type Attributes Default Description
x string Value to interrogate.
bUppercase boolean <optional>
false Value representing if the UUID should be represented in uppercase letters.
Returns:
Type Description
object Value representing the passed value as a formatted UUID.

[mixin] ish.type.uuid.get(iVersionopt) → {boolean}

Source:
See:
Generates a Universally Unique Identifier (UUID).
From Mixin: ish.type-ex.js must be included for ishJS to access this functionality.
AKA: ish.type.uuid
Parameters:
Name Type Attributes Default Description
iVersion integer <optional>
4 Value representing the UUID version to create, with valid values ranging between 1-5.
Returns:
Type Description
boolean Value representing UUID.

[mixin] ish.type.uuid.is(x, vOptionsopt) → {boolean}

Source:
See:
Determines if the passed value represents a UUID.
From Mixin: ish.type-ex.js must be included for ishJS to access this functionality.
Parameters:
Name Type Attributes Description
x string Value to interrogate.
vOptions boolean | object <optional>
Value representing if Nil UUIDs are to be ignored or the following options:
Properties
Name Type Attributes Default Description
excludeNilUUID boolean <optional>
false Value representing if Nil UUIDs are to be ignored.
allowBrackets boolean <optional>
false Value representing if enclosing brackets ({}) are to be allowed.
version integer <optional>
Value representing the required UUID version, with valid values ranging between 1-5.
Returns:
Type Description
boolean Value representing if the passed value represents a UUID.

[mixin] ish.type.uuid.mk(x, vDefaultValopt) → {object}

Source:
Casts the passed value into a UUID.
From Mixin: ish.type-ex.js must be included for ishJS to access this functionality.
Parameters:
Name Type Attributes Default Description
x string Value to interrogate.
vDefaultVal variant <optional>
ish.type.uuid() Value representing the default return value if casting fails.
Returns:
Type Description
object Value representing the passed value as a UUID.