Paqmind extensions to Ramda mostly concerned about Lenses.
wip
$ npm install @paqmind/ramdax
import * as R from "@paqmind/ramdax"
Hints: use IDE shortcuts for most common imports, check Webpack's ProvidePlugin
.
The API reexports all functions from Ramda adding the following.
isNotEmpty
notNil
firstOk
id | I
– aliasidentity
K
– aliasalways
S
– S combinator
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.
map2
–R.addIndex(R.map)
filter2
– ...chain2
– ...reduce2
– ...
withName, fn
– name your anonymous functions
appendFlipped
prependFlipped
concatFlipped
takeUntil
– a companion oftakeWhile
mergeDeep
– aliasmergeDeepRight
mergeFlipped
mergeDeepFlipped
isPlainObj
flattenObj
MIT