Module:UtilsTable/Documentation

Utility library for operating on Lua tables. Inspired by Lodash.

Some functions have two variants: a "normal" variant, and a  variant of the same name but prefixed with. The latter functions are curried and iteratee-first data-last as in lodash/fp. This is useful for composition. For example,

The above example is somewhat contrived for the sake of simplicity. In real contexts, use whichever utility function results in the greatest readability. Sometimes the best option will be to forgo these utilities in favor of plain for-loops.