rambda 10.3.1 → 10.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  10.3.1
2
2
 
3
- - Fix issue with wrong order of inputs in `R.propOr` - [Issue #779](https://github.com/selfrefactor/rambda/issues/779)
3
+ - Fix issue with wrong order of inputs in `R.createObjectFromKeys` - [Issue #779](https://github.com/selfrefactor/rambda/issues/779)
4
+
5
+ 10.3.1
6
+
7
+ - Fix issue with wrong order of inputs in `R.propEq` - [Issue #779](https://github.com/selfrefactor/rambda/issues/779)
4
8
 
5
9
  - Fix issue with TypeScript definitions for `R.includes`- [Issue #781](https://github.com/selfrefactor/rambda/issues/781)
6
10
 
@@ -8,16 +12,12 @@
8
12
 
9
13
  - Add `R.mapPropObject`
10
14
 
11
- - Add `R.duplicateBy`
12
15
  - Add `R.duplicateBy`
13
16
 
14
- - Add `R.filterAsync`
15
17
  - Add `R.filterAsync`
16
18
 
17
- - Add `R.indexBy`
18
19
  - Add `R.indexBy`
19
20
 
20
- - Restore `R.replaceAll`
21
21
  - Restore `R.replaceAll`
22
22
 
23
23
  - Remove option for `R.mapAsync` to be called outside of `R.pipeAsync`. This is done for consistency as all other methods follow this rule, i.e. they are all curried.
package/README.md CHANGED
@@ -834,13 +834,11 @@ append<T>(el: T): (list: T[]) => T[]
834
834
  It adds element `x` at the end of `iterable`.
835
835
 
836
836
  ```javascript
837
- const x = 'foo'
838
-
839
- const result = R.append(x, ['bar', 'baz'])
837
+ const result = R.append('foo')(['bar', 'baz'])
840
838
  // => ['bar', 'baz', 'foo']
841
839
  ```
842
840
 
843
- <a title="redirect to Rambda Repl site" href="https://rambda.now.sh?const%20x%20%3D%20'foo'%0A%0Aconst%20result%20%3D%20R.append(x%2C%20%5B'bar'%2C%20'baz'%5D)%0A%2F%2F%20%3D%3E%20%5B'bar'%2C%20'baz'%2C%20'foo'%5D">Try this <strong>R.append</strong> example in Rambda REPL</a>
841
+ <a title="redirect to Rambda Repl site" href="https://rambda.now.sh?const%20result%20%3D%20R.append('foo')(%5B'bar'%2C%20'baz'%5D)%0A%2F%2F%20%3D%3E%20%5B'bar'%2C%20'baz'%2C%20'foo'%5D">Try this <strong>R.append</strong> example in Rambda REPL</a>
844
842
 
845
843
  <details>
846
844
 
@@ -1805,8 +1803,8 @@ createObjectFromKeys<const K extends readonly PropertyKey[], V>(
1805
1803
  <summary><strong>R.createObjectFromKeys</strong> source</summary>
1806
1804
 
1807
1805
  ```javascript
1808
- export function createObjectFromKeys(keys) {
1809
- return fn => {
1806
+ export function createObjectFromKeys(fn) {
1807
+ return keys => {
1810
1808
  const result = {}
1811
1809
  keys.forEach((key, index) => {
1812
1810
  result[key] = fn(key, index)
@@ -1827,7 +1825,7 @@ export function createObjectFromKeys(keys) {
1827
1825
  import { createObjectFromKeys } from './createObjectFromKeys.js'
1828
1826
 
1829
1827
  test('happy', () => {
1830
- const result = createObjectFromKeys(['a', 'b'])((key, index) => key.toUpperCase() + index)
1828
+ const result = createObjectFromKeys((key, index) => key.toUpperCase() + index)(['a', 'b'])
1831
1829
  const expected = { a: 'A0', b: 'B1' }
1832
1830
 
1833
1831
  expect(result).toEqual(expected)
@@ -3117,14 +3115,14 @@ const input = {
3117
3115
  }
3118
3116
  const result = R.pipe(
3119
3117
  input,
3120
- evolve({
3118
+ R.evolve({
3121
3119
  foo: x => x + 1,
3122
3120
  })
3123
3121
  )
3124
3122
  // => result is { foo: 3, baz: 'baz' }
3125
3123
  ```
3126
3124
 
3127
- <a title="redirect to Rambda Repl site" href="https://rambda.now.sh?const%20input%20%3D%20%7B%0A%09foo%3A%202%2C%0A%09baz%3A%20'baz'%2C%0A%7D%0Aconst%20result%20%3D%20R.pipe(%0A%09input%2C%0A%09evolve(%7B%0A%09%09foo%3A%20x%20%3D%3E%20x%20%2B%201%2C%0A%09%7D)%0A)%0A%2F%2F%20%3D%3E%20result%20is%20%7B%20foo%3A%203%2C%20baz%3A%20'baz'%20%7D">Try this <strong>R.evolve</strong> example in Rambda REPL</a>
3125
+ <a title="redirect to Rambda Repl site" href="https://rambda.now.sh?const%20input%20%3D%20%7B%0A%09foo%3A%202%2C%0A%09baz%3A%20'baz'%2C%0A%7D%0Aconst%20result%20%3D%20R.pipe(%0A%09input%2C%0A%09R.evolve(%7B%0A%09%09foo%3A%20x%20%3D%3E%20x%20%2B%201%2C%0A%09%7D)%0A)%0A%2F%2F%20%3D%3E%20result%20is%20%7B%20foo%3A%203%2C%20baz%3A%20'baz'%20%7D">Try this <strong>R.evolve</strong> example in Rambda REPL</a>
3128
3126
 
3129
3127
  <details>
3130
3128
 
@@ -13545,7 +13543,11 @@ describe('R.zipWith', () => {
13545
13543
 
13546
13544
  10.3.1
13547
13545
 
13548
- - Fix issue with wrong order of inputs in `R.propOr` - [Issue #779](https://github.com/selfrefactor/rambda/issues/779)
13546
+ - Fix issue with wrong order of inputs in `R.createObjectFromKeys` - [Issue #779](https://github.com/selfrefactor/rambda/issues/779)
13547
+
13548
+ 10.3.1
13549
+
13550
+ - Fix issue with wrong order of inputs in `R.propEq` - [Issue #779](https://github.com/selfrefactor/rambda/issues/779)
13549
13551
 
13550
13552
  - Fix issue with TypeScript definitions for `R.includes`- [Issue #781](https://github.com/selfrefactor/rambda/issues/781)
13551
13553
 
@@ -13553,16 +13555,12 @@ describe('R.zipWith', () => {
13553
13555
 
13554
13556
  - Add `R.mapPropObject`
13555
13557
 
13556
- - Add `R.duplicateBy`
13557
13558
  - Add `R.duplicateBy`
13558
13559
 
13559
- - Add `R.filterAsync`
13560
13560
  - Add `R.filterAsync`
13561
13561
 
13562
- - Add `R.indexBy`
13563
13562
  - Add `R.indexBy`
13564
13563
 
13565
- - Restore `R.replaceAll`
13566
13564
  - Restore `R.replaceAll`
13567
13565
 
13568
13566
  - Remove option for `R.mapAsync` to be called outside of `R.pipeAsync`. This is done for consistency as all other methods follow this rule, i.e. they are all curried.
package/dist/rambda.cjs CHANGED
@@ -230,8 +230,8 @@ function countBy(fn) {
230
230
  }
231
231
  }
232
232
 
233
- function createObjectFromKeys(keys) {
234
- return fn => {
233
+ function createObjectFromKeys(fn) {
234
+ return keys => {
235
235
  const result = {};
236
236
  keys.forEach((key, index) => {
237
237
  result[key] = fn(key, index);
package/dist/rambda.js CHANGED
@@ -228,8 +228,8 @@ function countBy(fn) {
228
228
  }
229
229
  }
230
230
 
231
- function createObjectFromKeys(keys) {
232
- return fn => {
231
+ function createObjectFromKeys(fn) {
232
+ return keys => {
233
233
  const result = {};
234
234
  keys.forEach((key, index) => {
235
235
  result[key] = fn(key, index);
@@ -234,8 +234,8 @@
234
234
  }
235
235
  }
236
236
 
237
- function createObjectFromKeys(keys) {
238
- return fn => {
237
+ function createObjectFromKeys(fn) {
238
+ return keys => {
239
239
  const result = {};
240
240
  keys.forEach((key, index) => {
241
241
  result[key] = fn(key, index);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rambda",
3
- "version": "10.3.1",
3
+ "version": "10.3.2",
4
4
  "scripts": {
5
5
  "out": "yarn populatedocs && yarn populatereadme && yarn build && yarn create-docsify",
6
6
  "build": "yarn build:main && yarn build:web && yarn build:esm",
@@ -1,5 +1,5 @@
1
- export function createObjectFromKeys(keys) {
2
- return fn => {
1
+ export function createObjectFromKeys(fn) {
2
+ return keys => {
3
3
  const result = {}
4
4
  keys.forEach((key, index) => {
5
5
  result[key] = fn(key, index)