Tomáš Konrády
Tomáš Konrády
Adding library to _Dynamic reducer injection_ section.
```js const firstPath = useWith(uncurryN(2, R_.dispatch), [map(path), identity]); const a = { key: "mr. Foo Bar", dataKey: "cool", } firstPath([["key"], ["dataKey"]])(a); // "mr. Foo Bar" ``` I am not sure...
Let us write a simple generator of predicate functions that are focused around values such as `null`, `true`, `0`... E.g.: - alwaysNull, alwaysZero, ... - defaultToNull, ...
Do you think that this would be useful? ```js const predicate = ifOtherwiseFalse(isValid, toUpper) predicate("nonValid") // false predicate("valid") // "VALID" ```
- use `sideEffects: false` - trace why the `es` distribution does break tree-shaking - create sample repo with R_ and Webpack for easy debugging and experimenting
```js sortByProp("foo")([{ foo: 2 }, { foo: -2 }]) // [{ foo: -2 }, { foo: 2 }] sortByPath(["foo", "bar"])([{ foo: { bar: 2 } }, { foo: { bar:...
``` const firstAndLastArg = R_.nthArgs([0, -1]) const f = (a, b) => [a, b]; firstAndLastArg(f)('first', 'second', 'last') // ['first', 'last'] ```