Class: Boolean

bo.dataTypes. Boolean

Provide methods to work with Boolean data.

new Boolean()

Creates Boolean data type definition.

Extends

Members

<readonly> name :string

The name of the data type. The default value is the name of the constructor.

Type:
  • string
Inherited From:

Methods

hasValue(value) → {boolean}

Checks if value is a Boolean data and is not null.

Parameters:
Name Type Description
value data

The value to check.

Returns:

True if the value is Boolean and not null, otherwise false.

Type
boolean

<virtual> isValid(value) → {*}

Abstract method to check if the value conforms to the data type definition. Returns the value when it has the required data type. If not, but it can be converted into the required data type, then returns the converted value. Otherwise returns undefined to mark the value as invalid.

Parameters:
Name Type Argument Description
value * <optional>

The value to check.

Inherited From:
Throws:
Not implemented error: The DataType.check method is not implemented.
Returns:

The value in the defined data type or null when the value is valid, otherwise undefined.

Type
*

parse(value) → {*}

Checks if value is a Boolean data.

Parameters:
Name Type Argument Description
value * <optional>

The value to check.

Returns:

The Boolean value or null when the input value is valid, otherwise undefined.

Type
*
If you find bugs or have feature requests, please let us know.

JavaScript business objects ♦ Copyright © 2014-2016 Logikum, Ltd.
Documentation generated by JSDoc 3.2.2 on 2015. December 31. using the DocStrap template.