ramda-adjunct 3.4.0 → 4.0.0

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.
Files changed (69) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +2 -2
  3. package/dist/RA.node.js +77 -39
  4. package/dist/RA.node.min.js +1 -1
  5. package/dist/RA.web.js +77 -39
  6. package/dist/RA.web.min.js +1 -1
  7. package/dist/RA.web.standalone.js +1178 -531
  8. package/dist/RA.web.standalone.min.js +1 -1
  9. package/es/concatAll.js +2 -1
  10. package/es/dispatch.js +1 -1
  11. package/es/ensureArray.js +1 -1
  12. package/es/flattenDepth.js +1 -1
  13. package/es/flattenProp.js +1 -1
  14. package/es/internal/ponyfills/Array.from.js +1 -1
  15. package/es/internal/ponyfills/Promise.allSettled.js +1 -1
  16. package/es/internal/ponyfills/Promise.any.js +1 -1
  17. package/es/isFalse.js +2 -2
  18. package/es/isNegativeZero.js +2 -2
  19. package/es/isPositiveZero.js +2 -2
  20. package/es/isTrue.js +2 -2
  21. package/es/lastP.js +1 -1
  22. package/es/lensTraverse.js +12 -3
  23. package/es/mergeProp.js +1 -1
  24. package/es/pathNotEq.js +4 -4
  25. package/es/propNotEq.js +3 -3
  26. package/es/reduceP.js +2 -2
  27. package/es/reduceRightP.js +2 -2
  28. package/es/sortByProps.js +1 -1
  29. package/es/spreadProp.js +1 -1
  30. package/lib/allEqual.js +0 -1
  31. package/lib/concatAll.js +2 -1
  32. package/lib/dispatch.js +36 -1
  33. package/lib/ensureArray.js +1 -1
  34. package/lib/flattenDepth.js +1 -1
  35. package/lib/flattenProp.js +1 -1
  36. package/lib/internal/ponyfills/Array.from.js +1 -1
  37. package/lib/internal/ponyfills/Promise.allSettled.js +1 -1
  38. package/lib/internal/ponyfills/Promise.any.js +1 -1
  39. package/lib/isFalse.js +1 -1
  40. package/lib/isNegativeZero.js +1 -1
  41. package/lib/isPositiveZero.js +1 -1
  42. package/lib/isSentinelValue.js +1 -2
  43. package/lib/isTrue.js +1 -1
  44. package/lib/lastP.js +1 -1
  45. package/lib/lensTraverse.js +11 -3
  46. package/lib/mergeProp.js +1 -1
  47. package/lib/pathNotEq.js +4 -4
  48. package/lib/propNotEq.js +3 -3
  49. package/lib/reduceP.js +2 -2
  50. package/lib/reduceRightP.js +2 -2
  51. package/lib/seq.js +0 -1
  52. package/lib/sortByProps.js +1 -1
  53. package/lib/spreadProp.js +1 -1
  54. package/lib/toInteger32.js +1 -2
  55. package/lib/toUinteger32.js +1 -3
  56. package/package.json +33 -33
  57. package/src/concatAll.js +2 -1
  58. package/src/ensureArray.js +1 -1
  59. package/src/flattenProp.js +1 -1
  60. package/src/isFalse.js +2 -2
  61. package/src/isNegativeZero.js +2 -2
  62. package/src/isPositiveZero.js +2 -2
  63. package/src/isTrue.js +2 -2
  64. package/src/lensTraverse.js +18 -6
  65. package/src/mergeProp.js +1 -1
  66. package/src/pathNotEq.js +4 -4
  67. package/src/propNotEq.js +3 -3
  68. package/src/spreadProp.js +1 -1
  69. package/tmp-test-bundle.js.LICENSE.txt +618 -0
@@ -10,8 +10,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
10
10
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
11
11
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
12
12
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
13
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
14
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
13
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
14
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
15
15
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
16
16
  // in older ramda versions the order of the arguments is flipped
17
17
  var flipArgs = (0, _ramda.pipe)((0, _ramda.reduceRight)(_ramda.concat, ''), (0, _ramda.equals)('ba'))(['a', 'b']);
package/lib/seq.js CHANGED
@@ -35,7 +35,6 @@ var _ramda = require("ramda");
35
35
  * )('test'); //=> 'PREFIX TEST'
36
36
  */
37
37
  /* eslint-enable max-len */
38
-
39
38
  var seq = (0, _ramda.curry)(function (fns, x) {
40
39
  return (0, _ramda.tap)(function (tx) {
41
40
  return (0, _ramda.map)(function (fn) {
@@ -6,7 +6,7 @@ var _ramda = require("ramda");
6
6
  function _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest(); }
7
7
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
8
8
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
9
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
9
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
10
10
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
11
11
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
12
  /**
package/lib/spreadProp.js CHANGED
@@ -24,7 +24,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
24
24
  * RA.spreadProp('b', { a: 1, b: { c: 3, d: 4 } }); // => { a: 1, c: 3, d: 4 };
25
25
  */
26
26
  var spreadProp = (0, _ramda.curry)(function (prop, obj) {
27
- return (0, _spreadPath["default"])((0, _ramda.of)(prop), obj);
27
+ return (0, _spreadPath["default"])((0, _ramda.of)(Array, prop), obj);
28
28
  });
29
29
  var _default = spreadProp;
30
30
  exports["default"] = _default;
@@ -19,8 +19,7 @@ var _ramda = require("ramda");
19
19
  *
20
20
  * RA.toInteger32(2 ** 35); // => 0
21
21
  * RA.toInteger32(2 ** 30); // => 1073741824
22
- */
23
- // eslint-disable-next-line no-bitwise
22
+ */ // eslint-disable-next-line no-bitwise
24
23
  var toInteger32 = (0, _ramda.curryN)(1, function (val) {
25
24
  return val >> 0;
26
25
  });
@@ -21,9 +21,7 @@ var _ramda = require("ramda");
21
21
  * RA.toInteger32(2 ** 35); // => 0
22
22
  * RA.toInteger32(2 ** 31); // => 2147483648
23
23
  * RA.toInteger32(2 ** 30); // => 1073741824
24
- */
25
-
26
- // eslint-disable-next-line no-bitwise
24
+ */ // eslint-disable-next-line no-bitwise
27
25
  var toUinteger32 = (0, _ramda.curryN)(1, function (val) {
28
26
  return val >>> 0;
29
27
  });
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "cookbook",
15
15
  "functional"
16
16
  ],
17
- "version": "3.4.0",
17
+ "version": "4.0.0",
18
18
  "homepage": "https://github.com/char0n/ramda-adjunct",
19
19
  "license": "BSD-3-Clause",
20
20
  "repository": {
@@ -93,8 +93,8 @@
93
93
  }
94
94
  },
95
95
  "test:web": "testem ci",
96
- "test:ramda": "bnr test:ramda0.28.0",
97
- "test:ramda0.28.0": "npm install ramda@0.28.0 && npm test",
96
+ "test:ramda": "bnr test:ramda0.29.0",
97
+ "test:ramda0.29.0": "npm install ramda@0.29.0 && npm test",
98
98
  "test:bundle-create": "webpack --config webpack.config-test.web.js --progress",
99
99
  "test:bundle-clean": "rimraf tmp-test-bundle.js",
100
100
  "coverage": {
@@ -121,64 +121,64 @@
121
121
  "clean": "rimraf .nyc_output .tmp docs coverage tmp-test-bundle.js dist lib es"
122
122
  },
123
123
  "peerDependencies": {
124
- "ramda": ">= 0.28.0 <= 0.28.0"
124
+ "ramda": ">= 0.29.0"
125
125
  },
126
126
  "devDependencies": {
127
- "@babel/cli": "7.19.3",
128
- "@babel/core": "=7.20.5",
129
- "@babel/plugin-transform-modules-commonjs": "=7.19.6",
130
- "@babel/preset-env": "=7.20.2",
131
- "@babel/register": "7.18.9",
132
- "@commitlint/cli": "=17.3.0",
133
- "@commitlint/config-conventional": "=17.3.0",
134
- "@typescript-eslint/eslint-plugin": "=5.45.0",
135
- "@typescript-eslint/parser": "=5.45.0",
127
+ "@babel/cli": "7.21.0",
128
+ "@babel/core": "=7.21.4",
129
+ "@babel/plugin-transform-modules-commonjs": "=7.21.2",
130
+ "@babel/preset-env": "=7.21.4",
131
+ "@babel/register": "7.21.0",
132
+ "@commitlint/cli": "=17.5.1",
133
+ "@commitlint/config-conventional": "=17.4.4",
134
+ "@typescript-eslint/eslint-plugin": "=5.57.1",
135
+ "@typescript-eslint/parser": "=5.57.1",
136
136
  "assert": "=2.0.0",
137
- "babel-loader": "=9.1.0",
137
+ "babel-loader": "=9.1.2",
138
138
  "babel-plugin-annotate-pure-calls": "0.4.0",
139
139
  "babel-plugin-istanbul": "6.1.1",
140
140
  "better-npm-run": "0.1.1",
141
141
  "chai": "4.3.7",
142
142
  "codecov": "3.8.3",
143
143
  "conventional-changelog-cli": "2.2.2",
144
- "core-js": "=3.26.1",
144
+ "core-js": "=3.30.0",
145
145
  "docdash": "git+https://github.com/char0n/docdash.git#534b44382138a55dd8d93642c979e51e46471185",
146
- "eslint": "=8.29.0",
146
+ "eslint": "=8.37.0",
147
147
  "eslint-config-airbnb-base": "=15.0.0",
148
- "eslint-config-prettier": "=8.5.0",
148
+ "eslint-config-prettier": "=8.8.0",
149
149
  "eslint-plugin-dtslint": "=3.0.1",
150
- "eslint-plugin-import": "=2.26.0",
150
+ "eslint-plugin-import": "=2.27.5",
151
151
  "eslint-plugin-mocha": "=10.1.0",
152
152
  "eslint-plugin-prettier": "4.2.1",
153
153
  "eslint-plugin-ramda": "2.5.1",
154
- "fantasy-land": "5.0.0",
154
+ "fantasy-land": "5.0.1",
155
155
  "fantasy-laws": "=2.0.1",
156
156
  "folktale": "=2.3.2",
157
- "glob": "=8.0.3",
158
- "husky": "8.0.2",
157
+ "glob": "=9.3.4",
158
+ "husky": "8.0.3",
159
159
  "istanbul": "=0.4.5",
160
- "jsdoc": "=4.0.0",
160
+ "jsdoc": "=4.0.2",
161
161
  "jsverify": "0.8.4",
162
162
  "license-cli": "1.1.6",
163
- "lint-staged": "13.0.4",
164
- "mocha": "=10.1.0",
163
+ "lint-staged": "13.2.0",
164
+ "mocha": "=10.2.0",
165
165
  "mocha-junit-reporter": "2.2.0",
166
166
  "mocha-multi-reporters": "1.5.1",
167
167
  "monet": "0.9.3",
168
168
  "nyc": "15.1.0",
169
- "prettier": "=2.8.0",
169
+ "prettier": "=2.8.7",
170
170
  "process": "=0.11.10",
171
- "ramda": "=0.28.0",
171
+ "ramda": "=0.29.0",
172
172
  "ramda-fantasy": "=0.8.0",
173
173
  "regenerator-runtime": "=0.13.11",
174
- "rimraf": "3.0.2",
174
+ "rimraf": "4.4.1",
175
175
  "sanctuary-show": "3.0.0",
176
- "sinon": "=15.0.0",
177
- "terser-webpack-plugin": "5.3.6",
178
- "testem": "=3.10.0",
179
- "typescript": "=4.9.3",
180
- "webpack": "=5.75.0",
181
- "webpack-cli": "5.0.0",
176
+ "sinon": "=15.0.3",
177
+ "terser-webpack-plugin": "5.3.7",
178
+ "testem": "=3.10.1",
179
+ "typescript": "=4.9.5",
180
+ "webpack": "=5.77.0",
181
+ "webpack-cli": "5.0.1",
182
182
  "taffydb": "npm:@jsdoc/salty@0.2.1"
183
183
  },
184
184
  "browserslist": "> 0.25%, ie 10, ie 11, not op_mini all",
package/src/concatAll.js CHANGED
@@ -24,7 +24,8 @@ const leftIdentitySemigroup = { concat: identity };
24
24
  *
25
25
  * concatAll([[1], [2], [3]]); //=> [1, 2, 3]
26
26
  * concatAll(['1', '2', '3']); //=> '123'
27
- * concatAll([]); //=> undefined;
27
+ * concatAll([]); //=> undefined
28
+ * concatAll(null); //=> undefined
28
29
  */
29
30
  const concatAll = pipe(
30
31
  reduce(concat, leftIdentitySemigroup),
@@ -19,6 +19,6 @@ import isNotArray from './isNotArray';
19
19
  * RA.ensureArray(42); //=> [42]
20
20
  * RA.ensureArray([42]); //=> [42]
21
21
  */
22
- const ensureArray = when(isNotArray, of);
22
+ const ensureArray = when(isNotArray, of(Array));
23
23
 
24
24
  export default ensureArray;
@@ -23,6 +23,6 @@ import flattenPath from './flattenPath';
23
23
  * { a: 1, b: { c: 3, d: 4 } }
24
24
  * ); // => { a: 1, c: 3, d: 4, b: { c: 3, d: 4 } };
25
25
  */
26
- const flattenProp = curry((prop, obj) => flattenPath(of(prop), obj));
26
+ const flattenProp = curry((prop, obj) => flattenPath(of(Array, prop), obj));
27
27
 
28
28
  export default flattenProp;
package/src/isFalse.js CHANGED
@@ -1,4 +1,4 @@
1
- import { identical } from 'ramda';
1
+ import { identical, curryN } from 'ramda';
2
2
 
3
3
  /**
4
4
  * Checks if input value is the Boolean primitive `false`. Will return false for all values created
@@ -26,6 +26,6 @@ import { identical } from 'ramda';
26
26
  * RA.isFalse(new Boolean(false)); // => false
27
27
  */
28
28
 
29
- const isFalse = identical(false);
29
+ const isFalse = curryN(1, identical(false));
30
30
 
31
31
  export default isFalse;
@@ -1,4 +1,4 @@
1
- import { identical } from 'ramda';
1
+ import { identical, curryN } from 'ramda';
2
2
 
3
3
  /**
4
4
  * Checks if value is a negative zero (-0).
@@ -18,6 +18,6 @@ import { identical } from 'ramda';
18
18
  * RA.isNegativeZero(0); //=> false
19
19
  * RA.isNegativeZero(null); //=> false
20
20
  */
21
- const isNegativeZero = identical(-0);
21
+ const isNegativeZero = curryN(1, identical(-0));
22
22
 
23
23
  export default isNegativeZero;
@@ -1,4 +1,4 @@
1
- import { identical } from 'ramda';
1
+ import { identical, curryN } from 'ramda';
2
2
 
3
3
  /**
4
4
  * Checks if value is a positive zero (+0).
@@ -18,6 +18,6 @@ import { identical } from 'ramda';
18
18
  * RA.isPositiveZero(-0); //=> false
19
19
  * RA.isPositiveZero(null); //=> false
20
20
  */
21
- const isPositiveZero = identical(+0);
21
+ const isPositiveZero = curryN(1, identical(+0));
22
22
 
23
23
  export default isPositiveZero;
package/src/isTrue.js CHANGED
@@ -1,4 +1,4 @@
1
- import { identical } from 'ramda';
1
+ import { identical, curryN } from 'ramda';
2
2
 
3
3
  /**
4
4
  * Checks if input value is the Boolean primitive `true`. Will return false for Boolean objects
@@ -22,6 +22,6 @@ import { identical } from 'ramda';
22
22
  * RA.isTrue(new Boolean(true)); // => false
23
23
  */
24
24
 
25
- const isTrue = identical(true);
25
+ const isTrue = curryN(1, identical(true));
26
26
 
27
27
  export default isTrue;
@@ -18,8 +18,10 @@ import Identity from './fantasy-land/Identity';
18
18
  * @since {@link https://char0n.github.io/ramda-adjunct/2.7.0|2.7.0}
19
19
  * @category Relation
20
20
  * @typedef Lens s a = Functor f => (a -> f a) -> s -> f s
21
+ * @sig fantasy-land/of :: TypeRep f => f ~> a → f a
21
22
  * @sig Applicative f => (a -> f a) -> Lens s a
22
- * @param {!function} of The Applicative-returning function
23
+ * @sig Applicative f => TypeRep f -> Lens s a
24
+ * @param {!Object|!Function} TypeRepresentative with an `of` or `fantasy-land/of` method
23
25
  * @return {!function} The Traversable lens
24
26
  * @see {@link http://ramdajs.com/docs/#lens|R.lens}, {@link http://ramdajs.com/docs/#traverse|R.traverse}
25
27
  *
@@ -35,10 +37,20 @@ import Identity from './fantasy-land/Identity';
35
37
  *
36
38
  * R.set(maybeLens, Maybe.Just(1), [Maybe.just(2), Maybe.Just(3)]); // => Maybe.Just([1, 1])
37
39
  */
38
- const lensTraverse = curryN(1, (of) =>
39
- curry((toFunctorFn, target) =>
40
- Identity.of(traverse(of, pipe(toFunctorFn, prop('value')), target))
41
- )
42
- );
40
+ /* eslint-disable no-nested-ternary */
41
+ const lensTraverse = curryN(1, (F) => {
42
+ const of =
43
+ typeof F['fantasy-land/of'] === 'function'
44
+ ? F['fantasy-land/of']
45
+ : typeof F.of === 'function'
46
+ ? F.of
47
+ : F;
48
+ const TypeRep = { 'fantasy-land/of': of };
49
+
50
+ return curry((toFunctorFn, target) =>
51
+ Identity.of(traverse(TypeRep, pipe(toFunctorFn, prop('value')), target))
52
+ );
53
+ });
54
+ /* eslint-enable */
43
55
 
44
56
  export default lensTraverse;
package/src/mergeProp.js CHANGED
@@ -25,6 +25,6 @@ import mergePath from './mergePath';
25
25
  * { outer: { foo: 2 } }
26
26
  * ); //=> { outer: { foo: 3, bar: 4 } };
27
27
  */
28
- const mergeProp = curry((p, subj, obj) => mergePath(of(p), subj, obj));
28
+ const mergeProp = curry((p, subj, obj) => mergePath(of(Array, p), subj, obj));
29
29
 
30
30
  export default mergeProp;
package/src/pathNotEq.js CHANGED
@@ -9,10 +9,10 @@ import { pathEq, complement } from 'ramda';
9
9
  * @memberOf RA
10
10
  * @since {@link https://char0n.github.io/ramda-adjunct/2.4.0|v2.4.0}
11
11
  * @category Relation
12
- * @sig [Idx] => a => {a} => Boolean
13
- * @sig Idx = String | Int
14
- * @param {Array} path The path of the nested property to use
12
+ * @sig a => [Idx] => {a} => Boolean
13
+ * @sig Idx = String | Int | Symbol
15
14
  * @param {a} val The value to compare the nested property with
15
+ * @param {Array} path The path of the nested property to use
16
16
  * @param {Object} object The object to check the nested property in
17
17
  * @return {boolean} Returns Boolean `false` if the value equals the nested object property, `true` otherwise
18
18
  * @see {@link http://ramdajs.com/docs/#pathEq|R.pathEq}
@@ -22,7 +22,7 @@ import { pathEq, complement } from 'ramda';
22
22
  * const user2 = { address: { zipCode: 55555 } };
23
23
  * const user3 = { name: 'Bob' };
24
24
  * const users = [ user1, user2, user3 ];
25
- * const isFamous = R.pathNotEq(['address', 'zipCode'], 90210);
25
+ * const isFamous = R.pathNotEq(90210, ['address', 'zipCode']);
26
26
  * R.filter(isFamous, users); //=> [ user2, user3 ]
27
27
  */
28
28
  /* eslint-enable max-len */
package/src/propNotEq.js CHANGED
@@ -8,9 +8,9 @@ import { propEq, complement } from 'ramda';
8
8
  * @memberOf RA
9
9
  * @since {@link https://char0n.github.io/ramda-adjunct/2.3.0|v2.3.0}
10
10
  * @category Relation
11
- * @sig String -> a -> Object -> Boolean
12
- * @param {String} name The property to pick
11
+ * @sig a -> String -> Object -> Boolean
13
12
  * @param {a} val The value to compare to
13
+ * @param {String} name The property to pick
14
14
  * @param {Object} object The object, that presumably contains value under the property
15
15
  * @return {boolean} Comparison result
16
16
  * @see {@link http://ramdajs.com/docs/#propEq|R.propEq}
@@ -21,7 +21,7 @@ import { propEq, complement } from 'ramda';
21
21
  * const rusty = { name: 'Rusty', age: 10, hair: 'brown' };
22
22
  * const alois = { name: 'Alois', age: 15, disposition: 'surly' };
23
23
  * const kids = [abby, fred, rusty, alois];
24
- * const hasNotBrownHair = RA.propNotEq('hair', 'brown');
24
+ * const hasNotBrownHair = RA.propNotEq('brown', 'hair');
25
25
  *
26
26
  * R.filter(hasNotBrownHair, kids); //=> [abby, alois]
27
27
  */
package/src/spreadProp.js CHANGED
@@ -20,6 +20,6 @@ import spreadPath from './spreadPath';
20
20
  *
21
21
  * RA.spreadProp('b', { a: 1, b: { c: 3, d: 4 } }); // => { a: 1, c: 3, d: 4 };
22
22
  */
23
- const spreadProp = curry((prop, obj) => spreadPath(of(prop), obj));
23
+ const spreadProp = curry((prop, obj) => spreadPath(of(Array, prop), obj));
24
24
 
25
25
  export default spreadProp;