Socket
Socket
Sign inDemoInstall

prelude-ls

Package Overview
Dependencies
0
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    prelude-ls

prelude.ls is a JavaScript functional programming library. It is the recommended base library for, and is written in, LiveScript. It is based off of Haskell's Prelude module.


Version published
Weekly downloads
39M
decreased by-9.48%
Maintainers
1
Install size
48.8 kB
Created
Weekly downloads
 

Package description

What is prelude-ls?

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.

What are prelude-ls's main functionalities?

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})

Other packages similar to prelude-ls

Changelog

Source

0.6.0

  • fixed various bugs
  • added fix, a fixpoint (Y combinator) for anonymous recursive functions
  • added unfoldr (alias unfold)
  • calling replicate with a string now returns a list of strings
  • removed partial, just use native partial application in LiveScript using the _ placeholder, or currying
  • added sort, sortBy, and compare

Readme

Source

prelude.ls

is a JavaScript functional programming library. It is the recommended base library for, and is written in, LiveScript. It is based in part off of Haskell's Prelude module.

See the prelude.ls site for examples, a reference, and more.

You can install via npm npm install prelude-ls

Keywords

FAQs

Last updated on 30 Jul 2012

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc