validation
Tiny utility library for validating function arguments
Status
Stable: Functionality is covered by semantic versioning guarantees and unlikely to see breaking changes
Availability
This module is preloaded. You can simply require it:
local validation = require("validation")
Functions
validateBoolean
Raises an error if the given argument is not a boolean value.
validateFunction
Raises an error if the given argument is not a function value.
validateNumber
Raises an error if the given argument is not a number value.
validateString
Raises an error if the given argument is not a string value.
validateStruct
Raises an error if the given argument is not a cdata value. The exact ctype is not checked in any way.
validateTable
Raises an error if the given argument is not a table value.
validateThread
Raises an error if the given argument is not a thread value (coroutine).
validateUserdata
Raises an error if the given argument is not a userdata value.
Changelog
| Version | What happened? |
|---|---|
| v0.0.1 | Initial release |