
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
prelude-ls
Advanced tools
prelude.ls is a functionally oriented utility library. It is powerful and flexible. Almost all of its functions are curried. It is written in, and is the recommended base library for, LiveScript.
The prelude-ls package is a functional programming library for JavaScript that provides utility functions for tasks like list manipulation, functional composition, and more. It is inspired by Haskell's Prelude module and other functional programming languages.
List manipulation
Provides functions to work with lists, such as map, filter, and reduce.
[1, 2, 3].map(function(x) { return x * 2; })
Functional composition
Allows the creation of new functions by composing existing ones.
compose([Math.sqrt, function(x) { return x + 1; }])(3)
Currying and partial application
Supports currying and partial application of functions for more flexible code reuse.
var add = curry(function(x, y) { return x + y; }); add(1)(2)
Object manipulation
Provides functions to manipulate objects, such as retrieving keys and values.
keys({a: 1, b: 2})
Lodash is a comprehensive utility library offering a similar set of tools for manipulating arrays, objects, and functions. It is well-documented and widely used with a strong focus on performance.
Underscore.js is another utility library with functional programming helpers similar to prelude-ls. It is known for its simplicity and has influenced many other libraries in the ecosystem.
Ramda is a functional programming library that emphasizes a more functional style than prelude-ls, with a focus on immutability and function purity.
Functional.js (or fn.js) is a smaller functional programming library that provides similar capabilities to prelude-ls but with a focus on functional chaining and composition.
is a functionally oriented utility library. It is powerful and flexible. Almost all of its functions are curried. It is written in, and is the recommended base library for, LiveScript.
See the prelude.ls site for examples, a reference, and more.
You can install via npm npm install prelude-ls
make test
to test
make build
to build lib
from src
make build-browser
to build browser versions
1.1.2
Func.memoize
zip-all
and zip-with-all
corner case (no input)FAQs
prelude.ls is a functionally oriented utility library. It is powerful and flexible. Almost all of its functions are curried. It is written in, and is the recommended base library for, LiveScript.
The npm package prelude-ls receives a total of 31,591,364 weekly downloads. As such, prelude-ls popularity was classified as popular.
We found that prelude-ls demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.