The BooleanFilter will check for booleans.

Extends AbstractFilter

Methods

sanitize (value)

private

Inherited from AbstractFilter but overwritten in lib/filter/boolean.js:25

The sanitize method will check if the value given is bigger than 0, if so a true will be returned

Parameters

Name Type Description
value * The value to sanitize.

Returned Value

Boolean: If the value is lower then 1 a false will be returned.


validate (value)

private

Inherited from AbstractFilter but overwritten in lib/filter/boolean.js:13

The validate method checks if the values is a true or false.

Parameters

Name Type Description
value * The value to evaluate.

Returned Value

Boolean: The the value is a boolean true will be returned.