Exciting release!Introducing "safe npm". Learn more
Socket
Log inDemoInstall

@flybondi/ramda-land

Package Overview
Dependencies
1
Maintainers
1
Versions
55
Issues
File Explorer

Advanced tools

@flybondi/ramda-land

A collection of reusable functions for ramda

    4.0.18latest
    GitHub

Version published
Maintainers
1
Weekly downloads
322
decreased by-44.48%

Weekly downloads

Readme

Source

@flybondi/ramda-land

ramda js-flybondi semantic-release js-semistandard-style code style: prettier

A comprehensive collection of utilities for Ramda, providing a variety of useful, well tested, reusable functions.

yarn add @flybondi/ramda-land yarn add ramda

Basic usage

Mix and match @flybondi/ramda-land functions with common ramda functions.

const { when } = require('ramda'); const { isNilOrEmpty, alwaysNew } = require('@flybondi/ramda-land'); const defaultToLife = when(isNilOrEmpty, alwaysNew({ life: 42 })); defaultToLife(null); // -> { life: 42 } defaultToLife({ foo: 'bar' }); // -> { foo: 'bar' }

Ramda overlap

curry, curryN and nAry functions are exported by both @flybondi/ramda-land and ramda. They behave in the exact same way, except that @flybondi/ramda-land counterparts retain wrapped function names after currying. This is useful for debugging and error tracing purposes as the name of the original function passed to any of the aforementioned functions will now appear on stack traces and debuggers (instead of an anonymous or sometimes arbitrarily named, internal ramda function).

This change was already proposed to the Ramda team and a PR is pending approval.

> curry(function foo(x, y) { return x + y; }); [Function: foo] > curry(function foo(x, y) { return x + y; })(1) [Function: foo] > curryN(2, function foo(x, y) { return x + y; }) [Function: foo] > curryN(2, function foo(x, y) { return x + y; })(1) [Function: foo] > nAry(3, function foo(x, y) { return x + y; }) [Function: foo]

View on Github.

Keywords

FAQs

Last updated on 25 Jan 2023

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket
support@socket.devSocket SOC 2 Logo

Product

  • Package Issues
  • 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