Call as
Platform.items.finite(value)
Record the dependency Platform.items.finite, then call it by that name. A namespaced call does not pass self: use a colon call or pass the object yourself.
What it does
Returns true when value is a finite, nonnegative number (not NaN or infinity), and false for anything else. Fractions pass.
Arguments
| Name | Type | What it does |
|---|---|---|
value | any | Value to test. |
Returns
| 1 | boolean | True when value is a finite number of at least zero. |
|---|
Editions
Built In helpers are registered on every edition. What differs is the game API they read; where one is missing the helper falls back or returns nil with a reason.
It reads no game API directly.
How the addon calls it
Platform.items.GetItemInfoInstantif not finite(id) or id<=0 or id%1~=0 or not finite(class) or class%1~=0
Source
Platform/items.lua, line 117. Read only in game; Duplicate makes an editable copy.
Platform.items.finite(value)
return type(value)=="number" and value==value and value>=0 and value<math.huge