Home

Awesome

Type Checking

This is a backport of most of AutoHotkey v2’s type checking features to v1. They are useful for validation and dispatching.

Design contains the reasons for the design decisions.

Installation

The files in src must be placed in a library directory.

Usage

Directly calling a function will cause its library to be auto-included. If the function is only called dynamically or indirectly, its library must be explicitly included.

IsInteger(Value)

IsFloat(Value)

IsNumber(Value)

IsString(Value)

Type(Value)

IsInstance(Value, Class) is v2’s is operator as a function.

HasProp(Value, Name)

HasMethod(Value, Name)

Be aware that these functions do not recognize implicitly-defined members, except for base, of primitives or user-defined types.