Options
All
  • Public
  • Public/Protected
  • All
Menu

Module Category

Discrete Common Sense Logic

Discrete Common Sense Logic only allows true, false, maybe, never or undefined as a value.

Index

Type aliases

Variables

Functions

Type aliases

Category

Category: typeof Categories[number]

Base Discrete Common Sense Logic type.

  • UNDEF – Totally unknown
  • FALSE – Certainly negative
  • NEVER – Impossible (neither positive nor negative)
  • MAYBE – Uncertain (could be either positive or negative)
  • TRUE – Certainly positive

Variables

Const Categories

Categories: readonly ["UNDEF", "FALSE", "NEVER", "MAYBE", "TRUE"] = ...

List of all five categories.

Useful to iterate through all five logical categories.

Const FALSE

FALSE: "FALSE" = ...

Discrete Logical Category of “certainly negative”

Const MAYBE

MAYBE: "MAYBE" = ...

Discrete Logical Category of “uncertain” (could be either positive or negative)

Const NEVER

NEVER: "NEVER" = ...

Discrete Logical Category of “impossible” (neither positive nor negative)

Const TRUE

TRUE: "TRUE" = ...

Discrete Logical Category of “certainly positive”

Const UNDEF

UNDEF: "UNDEF" = ...

Discrete Logical Category of “totally unknown”

Functions

and

  • Discrete Logical AND:

    a \ b undef false never maybe true
    undef undef undef undef undef undef
    false undef false false false false
    never undef false never false never
    maybe undef false false maybe maybe
    true undef false never maybe true

    Parameters

    Returns Category

not

  • Discrete Logical NOT:

    undef false never maybe true
    undef true maybe never false

    Parameters

    Returns Category

or

  • Discrete Logical OR:

    a \ b undef false never maybe true
    undef undef undef undef undef undef
    false undef false never maybe true
    never undef never never true true
    maybe undef maybe true maybe true
    true undef true true true true

    Parameters

    Returns Category

Generated using TypeDoc