Module util
Utils to support Pickle.
Info:
- Author: John Erling Blad < jeblad@gmail.com >
Functions
buildName (name) | Transform names in camel case into hyphen separated keys. |
builKey (...) | Transform names in camel case into hyphen separated keys. |
count (t) | Raw count of all the items in the provided table. |
size ([count]) | Size based on the raw count. |
deepEqual (a, b[, useMt=false]) | Deep equal of two objects. |
contains (t, arg) | Checks if a table contains the arg. |
Functions
- buildName (name)
-
Transform names in camel case into hyphen separated keys.
Parameters:
- name string in camel case
Returns:
string hyphenated name - builKey (...)
-
Transform names in camel case into hyphen separated keys.
Parameters:
- ... vararg strings for the key
Returns:
string hyphenated name - count (t)
-
Raw count of all the items in the provided table.
Variant of 'local function count(t)' from "Moses"
Parameters:
- t table has its entries counted
Returns:
number raw entries - size ([count])
-
Size based on the raw count.
Variant of 'function _.size(...)' from "Moses"
Parameters:
- count table or any entries if table, count varargs otherwise (optional)
Returns:
number counted entries - deepEqual (a, b[, useMt=false])
-
Deep equal of two objects.
Variant of
'function _.isEqual(objA, objB, useMt)'
from Yonaba/Moses.
Parameters:
- a any type of object
- b any type of object
- useMt boolean indicator for whether to include the meta table (default false)
Returns:
boolean result of comparison - contains (t, arg)
-
Checks if a table contains the arg.
Variant of 'function _.contains(t, value)' from "Moses"
Parameters:
- t table searched for the arg
- arg any item to be searched for
Returns:
boolean result of the operation