Miso.Dataset.types. boolean

The boolean type is used for columns of true/false booleans.

Source

Methods

<static> coerce ( v )

Returns: Boolean

Coerces the value to a boolean, uses javascript truthy/falsy.

Parameters

  • v mixed required

    Value to be coerced

Returns

Type: Boolean
Source

<static> compare ( n1, n2 )

Returns: Number

Compares two boolean type values

Parameters

  • n1 Boolean required

    First value to be compared

  • n2 Boolean required

    Second value to be compared

Returns

Type: Number
Source

<static> numeric ( value )

Returns: Number

Returns the numeric representation of a boolean value - false is 0, true 1.

Parameters

  • value mixed required

    Value to be coerced to numeric

Returns

Type: Number
Source

<static> test ( v )

Returns: Boolean

Tests whether the value is a boolean.

Parameters

  • v mixed required

    Value to be tested

Returns

Type: Boolean
Source