New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@paqmind/ramdax

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@paqmind/ramdax

Ramda extended with additional helpers

latest
Source
npmnpm
Version
0.5.0
Version published
Maintainers
1
Created
Source

Paqmind/Ramda

Paqmind extensions to Ramda mostly concerned about Lenses.

wip

Usage

$ npm install @paqmind/ramdax
import * as R from "@paqmind/ramdax"

Hints: use IDE shortcuts for most common imports, check Webpack's ProvidePlugin.

Extra API

The API reexports all functions from Ramda adding the following.

Logic

  • isNotEmpty
  • notNil
  • firstOk
  • id | I – alias identity
  • K – alias always
  • S – S combinator

Lensing

  • lensify
  • over2
  • set2
  • unset2
  • view2

Allow to use strings and arrays in place of lenses. For weird reasons, Ramda doesn't support convenient shortcuts for objects and arrays. We follow Partial.Lenses design and use them.

R.set2("foo", "FOO", {})          // can be used instead of R.assoc
R.set2(["foo", "bar"], "BAR", {}) // can be used instead of R.assocPath

Note: names are under consideration. We may decide to override R.set, R.over, R.view instead of adding xxx2 versions in the future.

Indexed versions

  • map2R.addIndex(R.map)
  • filter2 – ...
  • chain2 – ...
  • reduce2 – ...

Functions

  • withName, fn – name your anonymous functions

Arrays

  • appendFlipped
  • prependFlipped
  • concatFlipped
  • takeUntil – a companion of takeWhile

Objects

  • mergeDeep – alias mergeDeepRight
  • mergeFlipped
  • mergeDeepFlipped
  • isPlainObj
  • flattenObj

LICENSE

MIT

Keywords

ramda

FAQs

Package last updated on 31 Dec 2018

Did you know?

Socket

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