Module logic

Logical operation utilites

Functions

isin (sub, main) Check if sub is contained in main (like Python's "x in y" syntax)
isnotin (sub, main) Check if sub is NOT contained in main (like Python's "x not in y" syntax)
isType (object, ...) Check if an object is of one or more types
isNotType (object, ...) Check if an object is not of one or more types

Tables

is Check if an object is truthy (like Python's "if x" syntax).
Not Check if an object is falsy (like Python's "if not x" syntax)


Functions

isin (sub, main)
Check if sub is contained in main (like Python's "x in y" syntax)

Parameters:

  • sub
  • main

Returns:

isnotin (sub, main)
Check if sub is NOT contained in main (like Python's "x not in y" syntax)

Parameters:

  • sub
  • main

Returns:

isType (object, ...)
Check if an object is of one or more types

Parameters:

  • object object to check type of
  • ... types to check for

Returns:

    boolean is the object type in the given types
isNotType (object, ...)
Check if an object is not of one or more types

Parameters:

  • object object to check type of
  • ... types to check for

Returns:

    boolean is the object type not in the given types

Tables

is
Check if an object is truthy (like Python's "if x" syntax). Truthy objects are any objects except for 0, false, nil and objects where len(object) == 0

Fields:

  • object
Not
Check if an object is falsy (like Python's "if not x" syntax)

Fields:

  • object
generated by LDoc 1.4.6 Last updated 2018-11-10 22:55:04