A comprehensive utility library for functional programming in Lua, inspired by Underscore.js.
Moses is a utility library for Lua that provides functional programming capabilities similar to JavaScript's Underscore.js. It offers a comprehensive set of functions for working with arrays, tables, and other data structures in a functional style, enabling developers to write more declarative and maintainable Lua code.
Lua developers who want to use functional programming patterns in their projects, particularly those working on data processing, game development, or scripting tasks where expressive data manipulation is needed.
Moses provides a battle-tested, comprehensive set of functional utilities specifically designed for Lua's ecosystem, with support for multiple Lua versions and both functional and object-oriented usage patterns. It's more complete than basic table operations while remaining lightweight and well-documented.
Utility library for functional programming in Lua
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides over 70 functions including map, reduce, filter, and range, enabling complex data transformations with minimal code, as demonstrated in the tutorial examples.
Supports both functional calls and object-oriented chaining, allowing developers to choose readable approaches, shown in the chaining examples like M.chain(M.range(25)):map(fib):sum():value().
Works seamlessly across Lua 5.1, 5.2, 5.3, and LuaJIT, ensuring wide applicability in different Lua ecosystems, as indicated by the version badges.
Includes detailed online docs, a tutorial with code examples, and minified versions (35 kiB), making adoption and learning straightforward, as highlighted in the README.
The full library is 92 kiB with over 3000 lines of code, which can bloat projects and increase load times, especially in resource-limited environments, despite the minified option.
Functional operations introduce abstraction layers that may slow down execution compared to optimized native loops, a concern for high-performance applications like game scripting.
With a vast number of functions, new users might find the API overwhelming, leading to a steeper learning curve despite documentation, potentially slowing initial development.
Moses is an open-source alternative to the following products: