ramda-adjunct 3.3.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 (493) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +2 -2
  3. package/dist/RA.node.js +235 -1605
  4. package/dist/RA.node.min.js +1 -1
  5. package/dist/RA.web.js +235 -1605
  6. package/dist/RA.web.min.js +1 -1
  7. package/dist/RA.web.standalone.js +1356 -2116
  8. package/dist/RA.web.standalone.min.js +1 -1
  9. package/es/Y.js +1 -0
  10. package/es/allEqual.js +3 -2
  11. package/es/allEqualTo.js +1 -1
  12. package/es/allIdentical.js +1 -1
  13. package/es/allIdenticalTo.js +1 -1
  14. package/es/allP.js +1 -1
  15. package/es/allSettledP.js +1 -1
  16. package/es/allUnique.js +1 -1
  17. package/es/anyP.js +1 -1
  18. package/es/appendFlipped.js +1 -1
  19. package/es/argsPass.js +1 -1
  20. package/es/async.js +1 -5
  21. package/es/cata.js +1 -4
  22. package/es/catchP.js +1 -1
  23. package/es/ceil.js +1 -0
  24. package/es/compact.js +1 -1
  25. package/es/concatAll.js +3 -2
  26. package/es/concatRight.js +1 -1
  27. package/es/copyKeys.js +5 -5
  28. package/es/curryRight.js +1 -1
  29. package/es/curryRightN.js +1 -2
  30. package/es/defaultWhen.js +1 -1
  31. package/es/delayP.js +1 -3
  32. package/es/dispatch.js +2 -11
  33. package/es/divideNum.js +1 -1
  34. package/es/dropArgs.js +1 -1
  35. package/es/ensureArray.js +2 -2
  36. package/es/escapeRegExp.js +1 -1
  37. package/es/fantasy-land/Identity.js +15 -20
  38. package/es/fantasy-land/traits.js +4 -5
  39. package/es/fantasy-land/util.js +8 -4
  40. package/es/filterIndexed.js +1 -1
  41. package/es/findOr.js +1 -0
  42. package/es/flattenDepth.js +2 -13
  43. package/es/flattenPath.js +1 -1
  44. package/es/flattenProp.js +2 -2
  45. package/es/floor.js +1 -0
  46. package/es/fnull.js +1 -1
  47. package/es/inRange.js +1 -1
  48. package/es/included.js +1 -1
  49. package/es/index.js +18 -29
  50. package/es/internal/ap.js +0 -1
  51. package/es/internal/isOfTypeObject.js +0 -2
  52. package/es/internal/makeFlat.js +1 -6
  53. package/es/internal/ponyfills/Array.from.js +1 -13
  54. package/es/internal/ponyfills/Math.sign.js +0 -1
  55. package/es/internal/ponyfills/Math.trunc.js +2 -5
  56. package/es/internal/ponyfills/Number.isFinite.js +2 -1
  57. package/es/internal/ponyfills/Number.isNaN.js +2 -1
  58. package/es/internal/ponyfills/Promise.allSettled.js +1 -11
  59. package/es/internal/ponyfills/Promise.any.js +4 -32
  60. package/es/internal/ponyfills/String.padEnd.js +0 -6
  61. package/es/internal/ponyfills/String.padStart.js +4 -9
  62. package/es/internal/ponyfills/String.repeat.js +3 -13
  63. package/es/internal/ponyfills/String.replaceAll.js +0 -5
  64. package/es/invoke.js +1 -1
  65. package/es/invokeArgs.js +1 -0
  66. package/es/isArray.js +1 -1
  67. package/es/isArrayLike.js +2 -11
  68. package/es/isAsyncFunction.js +1 -1
  69. package/es/isBigInt.js +1 -1
  70. package/es/isBlank.js +0 -1
  71. package/es/isBoolean.js +1 -1
  72. package/es/isDate.js +1 -1
  73. package/es/isEmptyArray.js +1 -1
  74. package/es/isEmptyString.js +1 -1
  75. package/es/isError.js +1 -1
  76. package/es/isEven.js +1 -1
  77. package/es/isFalse.js +3 -2
  78. package/es/isFalsy.js +1 -1
  79. package/es/isFinite.js +1 -2
  80. package/es/isFloat.js +1 -1
  81. package/es/isFunction.js +1 -1
  82. package/es/isGeneratorFunction.js +2 -13
  83. package/es/isIndexed.js +1 -0
  84. package/es/isInteger.js +1 -1
  85. package/es/isInteger32.js +1 -1
  86. package/es/isIterable.js +1 -2
  87. package/es/isMap.js +1 -0
  88. package/es/isNaN.js +1 -2
  89. package/es/isNaturalNumber.js +1 -0
  90. package/es/isNegative.js +1 -1
  91. package/es/isNegativeZero.js +3 -3
  92. package/es/isNilOrEmpty.js +1 -1
  93. package/es/isNonEmptyArray.js +1 -1
  94. package/es/isNonEmptyString.js +1 -1
  95. package/es/isNonNegative.js +1 -1
  96. package/es/isNonPositive.js +1 -1
  97. package/es/isNotArray.js +1 -1
  98. package/es/isNotArrayLike.js +1 -1
  99. package/es/isNotAsyncFunction.js +1 -3
  100. package/es/isNotBoolean.js +1 -1
  101. package/es/isNotDate.js +1 -1
  102. package/es/isNotEmpty.js +1 -1
  103. package/es/isNotFinite.js +1 -1
  104. package/es/isNotFloat.js +1 -1
  105. package/es/isNotFunction.js +1 -3
  106. package/es/isNotGeneratorFunction.js +1 -3
  107. package/es/isNotInteger.js +1 -1
  108. package/es/isNotMap.js +1 -0
  109. package/es/isNotNaN.js +1 -1
  110. package/es/isNotNil.js +1 -1
  111. package/es/isNotNilOrEmpty.js +1 -1
  112. package/es/isNotNull.js +1 -1
  113. package/es/isNotNumber.js +1 -1
  114. package/es/isNotObj.js +1 -3
  115. package/es/isNotObjLike.js +1 -3
  116. package/es/isNotPair.js +1 -1
  117. package/es/isNotPlainObj.js +1 -3
  118. package/es/isNotPrimitive.js +1 -0
  119. package/es/isNotRegExp.js +1 -1
  120. package/es/isNotSet.js +1 -0
  121. package/es/isNotString.js +1 -1
  122. package/es/isNotUndefined.js +1 -1
  123. package/es/isNotValidDate.js +1 -1
  124. package/es/isNotValidNumber.js +1 -1
  125. package/es/isNull.js +1 -1
  126. package/es/isNumber.js +1 -1
  127. package/es/isObj.js +1 -3
  128. package/es/isObjLike.js +1 -3
  129. package/es/isOdd.js +1 -1
  130. package/es/isPair.js +1 -1
  131. package/es/isPlainObj.js +1 -6
  132. package/es/isPositive.js +1 -1
  133. package/es/isPositiveZero.js +3 -3
  134. package/es/isPrimitive.js +1 -0
  135. package/es/isPromise.js +1 -1
  136. package/es/isPrototypeOf.js +1 -1
  137. package/es/isRegExp.js +1 -1
  138. package/es/isSafeInteger.js +1 -0
  139. package/es/isSentinelValue.js +1 -1
  140. package/es/isSet.js +1 -0
  141. package/es/isSparseArray.js +1 -1
  142. package/es/isString.js +1 -1
  143. package/es/isSymbol.js +1 -2
  144. package/es/isThenable.js +1 -1
  145. package/es/isTrue.js +3 -2
  146. package/es/isTruthy.js +1 -1
  147. package/es/isUinteger32.js +1 -1
  148. package/es/isUndefined.js +1 -1
  149. package/es/isValidDate.js +1 -3
  150. package/es/isValidNumber.js +1 -1
  151. package/es/lastP.js +2 -10
  152. package/es/lengthEq.js +1 -1
  153. package/es/lengthGt.js +1 -1
  154. package/es/lengthGte.js +1 -1
  155. package/es/lengthLt.js +1 -1
  156. package/es/lengthLte.js +1 -1
  157. package/es/lengthNotEq.js +1 -1
  158. package/es/lensEq.js +1 -1
  159. package/es/lensIso.js +9 -8
  160. package/es/lensNotEq.js +1 -1
  161. package/es/lensNotSatisfy.js +1 -1
  162. package/es/lensSatisfies.js +1 -1
  163. package/es/lensTraverse.js +13 -4
  164. package/es/liftF.js +1 -1
  165. package/es/liftFN.js +1 -2
  166. package/es/list.js +1 -1
  167. package/es/mapIndexed.js +1 -1
  168. package/es/mergePath.js +1 -1
  169. package/es/mergePaths.js +1 -1
  170. package/es/mergeProp.js +2 -2
  171. package/es/mergeProps.js +1 -1
  172. package/es/move.js +1 -1
  173. package/es/nand.js +1 -1
  174. package/es/neither.js +1 -3
  175. package/es/noneP.js +1 -1
  176. package/es/nonePass.js +1 -1
  177. package/es/noop.js +1 -1
  178. package/es/nor.js +1 -1
  179. package/es/notAllPass.js +1 -1
  180. package/es/notAllUnique.js +1 -1
  181. package/es/notBoth.js +1 -3
  182. package/es/notEqual.js +1 -1
  183. package/es/omitBy.js +1 -3
  184. package/es/omitIndexes.js +3 -2
  185. package/es/overlaps.js +1 -1
  186. package/es/padCharsEnd.js +1 -1
  187. package/es/padCharsStart.js +1 -1
  188. package/es/padEnd.js +1 -1
  189. package/es/padStart.js +1 -1
  190. package/es/pathNotEq.js +5 -7
  191. package/es/pathOrLazy.js +1 -1
  192. package/es/paths.js +1 -1
  193. package/es/pickIndexes.js +3 -2
  194. package/es/propNotEq.js +4 -4
  195. package/es/rangeStep.js +1 -1
  196. package/es/reduceIndexed.js +1 -1
  197. package/es/reduceP.js +5 -17
  198. package/es/reduceRightP.js +7 -20
  199. package/es/rejectP.js +1 -1
  200. package/es/renameKeyWith.js +1 -1
  201. package/es/renameKeys.js +1 -4
  202. package/es/renameKeysWith.js +1 -1
  203. package/es/repeatStr.js +1 -1
  204. package/es/replaceAll.js +1 -1
  205. package/es/resolveP.js +1 -3
  206. package/es/round.js +1 -0
  207. package/es/seq.js +1 -2
  208. package/es/sign.js +1 -0
  209. package/es/skipTake.js +1 -0
  210. package/es/sliceFrom.js +1 -1
  211. package/es/sliceTo.js +1 -1
  212. package/es/sortByPaths.js +1 -0
  213. package/es/sortByProp.js +42 -0
  214. package/es/sortByProps.js +4 -12
  215. package/es/spreadPath.js +1 -1
  216. package/es/spreadProp.js +2 -2
  217. package/es/stubArray.js +1 -1
  218. package/es/stubNull.js +1 -1
  219. package/es/stubObj.js +1 -1
  220. package/es/stubString.js +1 -1
  221. package/es/stubUndefined.js +1 -1
  222. package/es/subtractNum.js +1 -1
  223. package/es/thenCatchP.js +1 -1
  224. package/es/toArray.js +1 -0
  225. package/es/toInteger32.js +0 -1
  226. package/es/toNumber.js +1 -1
  227. package/es/toUinteger32.js +2 -1
  228. package/es/trimCharsEnd.js +1 -0
  229. package/es/trimCharsStart.js +1 -0
  230. package/es/trimEnd.js +1 -0
  231. package/es/trimStart.js +1 -0
  232. package/es/trunc.js +1 -0
  233. package/es/unzipObjWith.js +1 -1
  234. package/es/viewOr.js +1 -0
  235. package/es/weave.js +1 -1
  236. package/es/weaveLazy.js +1 -1
  237. package/es/zipObjWith.js +1 -1
  238. package/lib/Y.js +1 -2
  239. package/lib/allEqual.js +0 -5
  240. package/lib/allEqualTo.js +0 -2
  241. package/lib/allIdentical.js +0 -4
  242. package/lib/allIdenticalTo.js +0 -2
  243. package/lib/allP.js +0 -2
  244. package/lib/allSettledP.js +1 -6
  245. package/lib/allUnique.js +0 -4
  246. package/lib/anyP.js +0 -10
  247. package/lib/appendFlipped.js +0 -2
  248. package/lib/argsPass.js +0 -5
  249. package/lib/async.js +0 -9
  250. package/lib/cata.js +0 -7
  251. package/lib/catchP.js +0 -2
  252. package/lib/ceil.js +1 -2
  253. package/lib/compact.js +0 -4
  254. package/lib/concatAll.js +3 -6
  255. package/lib/concatRight.js +0 -2
  256. package/lib/copyKeys.js +4 -8
  257. package/lib/curryRight.js +0 -4
  258. package/lib/curryRightN.js +0 -3
  259. package/lib/defaultWhen.js +0 -2
  260. package/lib/delayP.js +1 -8
  261. package/lib/dispatch.js +36 -16
  262. package/lib/divideNum.js +0 -2
  263. package/lib/dropArgs.js +0 -2
  264. package/lib/ensureArray.js +1 -5
  265. package/lib/escapeRegExp.js +0 -4
  266. package/lib/fantasy-land/Identity.js +14 -27
  267. package/lib/fantasy-land/traits.js +4 -28
  268. package/lib/fantasy-land/util.js +6 -5
  269. package/lib/filterIndexed.js +0 -2
  270. package/lib/findOr.js +1 -2
  271. package/lib/flattenDepth.js +2 -15
  272. package/lib/flattenPath.js +0 -2
  273. package/lib/flattenProp.js +1 -5
  274. package/lib/floor.js +1 -2
  275. package/lib/fnull.js +1 -6
  276. package/lib/inRange.js +1 -4
  277. package/lib/included.js +0 -2
  278. package/lib/index.js +4 -425
  279. package/lib/internal/ap.js +0 -9
  280. package/lib/internal/compareLength.js +0 -2
  281. package/lib/internal/isCoercible.js +0 -6
  282. package/lib/internal/isOfTypeObject.js +0 -3
  283. package/lib/internal/makeFlat.js +0 -8
  284. package/lib/internal/ponyfills/Array.from.js +1 -19
  285. package/lib/internal/ponyfills/Math.sign.js +0 -2
  286. package/lib/internal/ponyfills/Math.trunc.js +2 -7
  287. package/lib/internal/ponyfills/Number.isFinite.js +0 -4
  288. package/lib/internal/ponyfills/Number.isInteger.js +0 -4
  289. package/lib/internal/ponyfills/Number.isNaN.js +0 -4
  290. package/lib/internal/ponyfills/Number.isSafeInteger.js +0 -5
  291. package/lib/internal/ponyfills/Promise.allSettled.js +1 -15
  292. package/lib/internal/ponyfills/Promise.any.js +4 -37
  293. package/lib/internal/ponyfills/String.padEnd.js +0 -10
  294. package/lib/internal/ponyfills/String.padStart.js +4 -13
  295. package/lib/internal/ponyfills/String.repeat.js +3 -16
  296. package/lib/internal/ponyfills/String.replaceAll.js +0 -9
  297. package/lib/internal/ponyfills/String.trimEnd.js +0 -2
  298. package/lib/internal/ponyfills/String.trimStart.js +0 -2
  299. package/lib/invoke.js +0 -4
  300. package/lib/invokeArgs.js +1 -5
  301. package/lib/isArray.js +0 -4
  302. package/lib/isArrayLike.js +0 -16
  303. package/lib/isAsyncFunction.js +0 -2
  304. package/lib/isBigInt.js +0 -2
  305. package/lib/isBlank.js +0 -4
  306. package/lib/isBoolean.js +0 -2
  307. package/lib/isDate.js +0 -2
  308. package/lib/isEmptyArray.js +0 -4
  309. package/lib/isEmptyString.js +0 -2
  310. package/lib/isError.js +0 -2
  311. package/lib/isEven.js +0 -5
  312. package/lib/isFalse.js +2 -3
  313. package/lib/isFalsy.js +0 -4
  314. package/lib/isFinite.js +1 -8
  315. package/lib/isFloat.js +0 -5
  316. package/lib/isFunction.js +0 -5
  317. package/lib/isGeneratorFunction.js +1 -15
  318. package/lib/isIndexed.js +1 -5
  319. package/lib/isInteger.js +1 -6
  320. package/lib/isInteger32.js +0 -4
  321. package/lib/isIterable.js +0 -5
  322. package/lib/isMap.js +1 -2
  323. package/lib/isNaN.js +1 -8
  324. package/lib/isNaturalNumber.js +1 -5
  325. package/lib/isNegative.js +0 -4
  326. package/lib/isNegativeZero.js +1 -3
  327. package/lib/isNilOrEmpty.js +0 -2
  328. package/lib/isNonEmptyArray.js +0 -5
  329. package/lib/isNonEmptyString.js +0 -6
  330. package/lib/isNonNegative.js +0 -4
  331. package/lib/isNonPositive.js +0 -4
  332. package/lib/isNotArray.js +0 -4
  333. package/lib/isNotArrayLike.js +0 -4
  334. package/lib/isNotAsyncFunction.js +0 -6
  335. package/lib/isNotBoolean.js +0 -4
  336. package/lib/isNotDate.js +0 -4
  337. package/lib/isNotEmpty.js +0 -2
  338. package/lib/isNotFinite.js +0 -4
  339. package/lib/isNotFloat.js +0 -4
  340. package/lib/isNotFunction.js +0 -6
  341. package/lib/isNotGeneratorFunction.js +0 -6
  342. package/lib/isNotInteger.js +0 -4
  343. package/lib/isNotMap.js +1 -4
  344. package/lib/isNotNaN.js +0 -4
  345. package/lib/isNotNil.js +0 -2
  346. package/lib/isNotNilOrEmpty.js +0 -4
  347. package/lib/isNotNull.js +0 -4
  348. package/lib/isNotNumber.js +0 -4
  349. package/lib/isNotObj.js +0 -6
  350. package/lib/isNotObjLike.js +0 -6
  351. package/lib/isNotPair.js +0 -4
  352. package/lib/isNotPlainObj.js +0 -6
  353. package/lib/isNotPrimitive.js +1 -4
  354. package/lib/isNotRegExp.js +0 -4
  355. package/lib/isNotSet.js +1 -4
  356. package/lib/isNotString.js +0 -4
  357. package/lib/isNotUndefined.js +0 -4
  358. package/lib/isNotValidDate.js +0 -4
  359. package/lib/isNotValidNumber.js +0 -4
  360. package/lib/isNull.js +0 -2
  361. package/lib/isNumber.js +0 -2
  362. package/lib/isObj.js +0 -8
  363. package/lib/isObjLike.js +0 -7
  364. package/lib/isOdd.js +0 -4
  365. package/lib/isPair.js +0 -4
  366. package/lib/isPlainObj.js +1 -12
  367. package/lib/isPositive.js +0 -4
  368. package/lib/isPositiveZero.js +1 -3
  369. package/lib/isPrimitive.js +1 -11
  370. package/lib/isPromise.js +0 -4
  371. package/lib/isPrototypeOf.js +0 -4
  372. package/lib/isRegExp.js +0 -2
  373. package/lib/isSafeInteger.js +1 -6
  374. package/lib/isSentinelValue.js +1 -6
  375. package/lib/isSet.js +1 -2
  376. package/lib/isSparseArray.js +0 -4
  377. package/lib/isString.js +0 -2
  378. package/lib/isSymbol.js +0 -3
  379. package/lib/isThenable.js +0 -4
  380. package/lib/isTrue.js +2 -3
  381. package/lib/isTruthy.js +0 -2
  382. package/lib/isUinteger32.js +0 -4
  383. package/lib/isUndefined.js +0 -4
  384. package/lib/isValidDate.js +0 -7
  385. package/lib/isValidNumber.js +0 -5
  386. package/lib/lastP.js +1 -17
  387. package/lib/lengthEq.js +0 -4
  388. package/lib/lengthGt.js +0 -4
  389. package/lib/lengthGte.js +0 -4
  390. package/lib/lengthLt.js +0 -4
  391. package/lib/lengthLte.js +0 -4
  392. package/lib/lengthNotEq.js +0 -4
  393. package/lib/lensEq.js +0 -2
  394. package/lib/lensIso.js +6 -8
  395. package/lib/lensNotEq.js +0 -4
  396. package/lib/lensNotSatisfy.js +0 -4
  397. package/lib/lensSatisfies.js +0 -4
  398. package/lib/lensTraverse.js +11 -7
  399. package/lib/liftF.js +0 -4
  400. package/lib/liftFN.js +0 -5
  401. package/lib/list.js +0 -2
  402. package/lib/mapIndexed.js +0 -2
  403. package/lib/mergePath.js +0 -2
  404. package/lib/mergePaths.js +0 -4
  405. package/lib/mergeProp.js +1 -5
  406. package/lib/mergeProps.js +0 -2
  407. package/lib/move.js +0 -2
  408. package/lib/nand.js +0 -3
  409. package/lib/neither.js +0 -4
  410. package/lib/noneP.js +0 -6
  411. package/lib/nonePass.js +0 -2
  412. package/lib/noop.js +0 -4
  413. package/lib/nor.js +0 -3
  414. package/lib/notAllPass.js +0 -2
  415. package/lib/notAllUnique.js +0 -4
  416. package/lib/notBoth.js +0 -4
  417. package/lib/notEqual.js +0 -2
  418. package/lib/omitBy.js +0 -4
  419. package/lib/omitIndexes.js +1 -3
  420. package/lib/overlaps.js +1 -5
  421. package/lib/padCharsEnd.js +1 -6
  422. package/lib/padCharsStart.js +1 -6
  423. package/lib/padEnd.js +0 -3
  424. package/lib/padStart.js +0 -3
  425. package/lib/pathNotEq.js +4 -8
  426. package/lib/pathOrLazy.js +0 -2
  427. package/lib/paths.js +0 -2
  428. package/lib/pickIndexes.js +1 -3
  429. package/lib/propNotEq.js +3 -5
  430. package/lib/rangeStep.js +0 -4
  431. package/lib/reduceIndexed.js +0 -2
  432. package/lib/reduceP.js +4 -22
  433. package/lib/reduceRightP.js +5 -25
  434. package/lib/rejectP.js +0 -2
  435. package/lib/renameKeyWith.js +0 -4
  436. package/lib/renameKeys.js +1 -7
  437. package/lib/renameKeysWith.js +0 -2
  438. package/lib/repeatStr.js +1 -6
  439. package/lib/replaceAll.js +1 -6
  440. package/lib/resolveP.js +0 -4
  441. package/lib/round.js +1 -2
  442. package/lib/seq.js +0 -4
  443. package/lib/sign.js +1 -6
  444. package/lib/skipTake.js +1 -2
  445. package/lib/sliceFrom.js +0 -2
  446. package/lib/sliceTo.js +0 -2
  447. package/lib/sortByPaths.js +1 -2
  448. package/lib/sortByProp.js +47 -0
  449. package/lib/sortByProps.js +4 -14
  450. package/lib/spreadPath.js +0 -2
  451. package/lib/spreadProp.js +1 -5
  452. package/lib/stubArray.js +1 -2
  453. package/lib/stubNull.js +0 -2
  454. package/lib/stubObj.js +1 -2
  455. package/lib/stubString.js +0 -2
  456. package/lib/stubUndefined.js +0 -3
  457. package/lib/subtractNum.js +0 -2
  458. package/lib/thenCatchP.js +0 -2
  459. package/lib/toArray.js +1 -6
  460. package/lib/toInteger32.js +1 -4
  461. package/lib/toNumber.js +0 -4
  462. package/lib/toUinteger32.js +1 -4
  463. package/lib/trimCharsEnd.js +1 -4
  464. package/lib/trimCharsStart.js +1 -4
  465. package/lib/trimEnd.js +1 -6
  466. package/lib/trimStart.js +1 -6
  467. package/lib/trunc.js +1 -6
  468. package/lib/unzipObjWith.js +0 -4
  469. package/lib/viewOr.js +1 -2
  470. package/lib/weave.js +0 -2
  471. package/lib/weaveLazy.js +0 -2
  472. package/lib/zipObjWith.js +0 -2
  473. package/package.json +41 -39
  474. package/src/concatAll.js +2 -1
  475. package/src/ensureArray.js +1 -1
  476. package/src/flattenProp.js +1 -1
  477. package/src/index.js +1 -0
  478. package/src/isFalse.js +2 -2
  479. package/src/isGeneratorFunction.js +2 -19
  480. package/src/isNegativeZero.js +2 -2
  481. package/src/isPositiveZero.js +2 -2
  482. package/src/isTrue.js +2 -2
  483. package/src/lensTraverse.js +18 -6
  484. package/src/mergeProp.js +1 -1
  485. package/src/pathNotEq.js +4 -4
  486. package/src/propNotEq.js +3 -3
  487. package/src/sortByProp.js +45 -0
  488. package/src/sortByProps.js +1 -1
  489. package/src/spreadProp.js +1 -1
  490. package/tmp-test-bundle.js.LICENSE.txt +618 -0
  491. package/types/.eslintrc.js +23 -0
  492. package/types/dtslint.eslint.js +13 -0
  493. package/types/index.d.ts +24 -5
package/lib/trunc.js CHANGED
@@ -2,16 +2,12 @@
2
2
 
3
3
  exports.__esModule = true;
4
4
  exports.truncPonyfill = exports["default"] = void 0;
5
-
6
5
  var _ramda = require("ramda");
7
-
8
6
  var _Math = _interopRequireDefault(require("./internal/ponyfills/Math.trunc"));
9
-
10
7
  var _isFunction = _interopRequireDefault(require("./isFunction"));
11
-
12
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
-
14
9
  var truncPonyfill = (0, _ramda.curryN)(1, _Math["default"]);
10
+
15
11
  /**
16
12
  * Returns the integer part of a number by removing any fractional digits.
17
13
  *
@@ -32,7 +28,6 @@ var truncPonyfill = (0, _ramda.curryN)(1, _Math["default"]);
32
28
  * RA.trunc(NaN); //=> NaN
33
29
  * RA.trunc('foo'); //=> NaN
34
30
  */
35
-
36
31
  exports.truncPonyfill = truncPonyfill;
37
32
  var trunc = (0, _isFunction["default"])(Math.trunc) ? (0, _ramda.curryN)(1, (0, _ramda.bind)(Math.trunc, Math)) : truncPonyfill;
38
33
  var _default = trunc;
@@ -2,13 +2,9 @@
2
2
 
3
3
  exports.__esModule = true;
4
4
  exports["default"] = void 0;
5
-
6
5
  var _ramda = require("ramda");
7
-
8
6
  var _lengthEq = _interopRequireDefault(require("./lengthEq"));
9
-
10
7
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
-
12
8
  /**
13
9
  * Creates a new list out of the supplied object by applying the function to each key/value pairing.
14
10
  *
package/lib/viewOr.js CHANGED
@@ -2,9 +2,7 @@
2
2
 
3
3
  exports.__esModule = true;
4
4
  exports["default"] = void 0;
5
-
6
5
  var _ramda = require("ramda");
7
-
8
6
  /**
9
7
  * Returns a "view" of the given data structure, determined by the given lens.
10
8
  * The lens's focus determines which portion of the data structure is visible.
@@ -29,6 +27,7 @@ var _ramda = require("ramda");
29
27
  * RA.viewOr('some', R.lensProp('y'), { y: null }); // => 'some'
30
28
  * RA.viewOr('some', R.lensProp('y'), { y: false }); // => false
31
29
  */
30
+
32
31
  var viewOr = (0, _ramda.curryN)(3, function (defaultValue, lens, data) {
33
32
  return (0, _ramda.defaultTo)(defaultValue, (0, _ramda.view)(lens, data));
34
33
  });
package/lib/weave.js CHANGED
@@ -2,9 +2,7 @@
2
2
 
3
3
  exports.__esModule = true;
4
4
  exports["default"] = void 0;
5
-
6
5
  var _ramda = require("ramda");
7
-
8
6
  /**
9
7
  * Weaves a configuration into function returning the runnable monad like `Reader` or `Free`.
10
8
  * This allows us to pre-bind the configuration in advance and use the weaved function
package/lib/weaveLazy.js CHANGED
@@ -2,9 +2,7 @@
2
2
 
3
3
  exports.__esModule = true;
4
4
  exports["default"] = void 0;
5
-
6
5
  var _ramda = require("ramda");
7
-
8
6
  /**
9
7
  * Weaves a configuration into function returning the runnable monad like `Reader` or `Free`.
10
8
  * This allows us to pre-bind the configuration in advance and use the weaved function
package/lib/zipObjWith.js CHANGED
@@ -2,9 +2,7 @@
2
2
 
3
3
  exports.__esModule = true;
4
4
  exports["default"] = void 0;
5
-
6
5
  var _ramda = require("ramda");
7
-
8
6
  /**
9
7
  * Creates a new object out of a list of keys and a list of values by applying the function
10
8
  * to each equally-positioned pair in the lists.
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "cookbook",
15
15
  "functional"
16
16
  ],
17
- "version": "3.3.0",
17
+ "version": "4.0.0",
18
18
  "homepage": "https://github.com/char0n/ramda-adjunct",
19
19
  "license": "BSD-3-Clause",
20
20
  "repository": {
@@ -70,7 +70,7 @@
70
70
  "test": "better-npm-run test",
71
71
  "test:web": "better-npm-run test:web",
72
72
  "test:ramda": "bnr test:ramda",
73
- "test:types": "dtslint ./types",
73
+ "test:types": "eslint --no-eslintrc --no-ignore -c ./types/dtslint.eslint.js ./types/test/*.ts",
74
74
  "test:bundle-create": "better-npm-run test:bundle-create",
75
75
  "test:bundle-clean": "better-npm-run test:bundle-clean",
76
76
  "coverage": "better-npm-run coverage",
@@ -83,8 +83,8 @@
83
83
  },
84
84
  "betterScripts": {
85
85
  "docs": "jsdoc -c jsdoc.json && node ./scripts/jsdoc-inject-dist.js",
86
- "lint": "eslint ./ && tslint --project types/tsconfig.json -c types/tslint.json types/**/*.ts",
87
- "lint:fix": "eslint ./ --fix && tslint --fix --project types/tsconfig.json -c types/tslint.json types/**/*.ts",
86
+ "lint": "eslint ./ && eslint --no-ignore --no-eslintrc -c ./types/.eslintrc.js ./types/test/**/*.ts",
87
+ "lint:fix": "eslint --fix ./ && eslint --no-ignore --no-eslintrc --fix -c ./types/.eslintrc.js ./types/test/**/*.ts",
88
88
  "changelog": "conventional-changelog -p angular -i ./CHANGELOG.md -s",
89
89
  "test": {
90
90
  "command": "mocha",
@@ -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,63 +121,65 @@
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.18.10",
128
- "@babel/core": "=7.19.1",
129
- "@babel/plugin-transform-modules-commonjs": "=7.18.6",
130
- "@babel/preset-env": "=7.19.1",
131
- "@babel/register": "7.18.9",
132
- "@commitlint/cli": "=17.1.2",
133
- "@commitlint/config-conventional": "=17.1.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",
134
136
  "assert": "=2.0.0",
135
- "babel-loader": "=8.2.5",
137
+ "babel-loader": "=9.1.2",
136
138
  "babel-plugin-annotate-pure-calls": "0.4.0",
137
139
  "babel-plugin-istanbul": "6.1.1",
138
140
  "better-npm-run": "0.1.1",
139
- "chai": "4.3.6",
141
+ "chai": "4.3.7",
140
142
  "codecov": "3.8.3",
141
143
  "conventional-changelog-cli": "2.2.2",
142
- "core-js": "=3.25.1",
144
+ "core-js": "=3.30.0",
143
145
  "docdash": "git+https://github.com/char0n/docdash.git#534b44382138a55dd8d93642c979e51e46471185",
144
- "dtslint": "=4.2.1",
145
- "eslint": "=8.23.1",
146
+ "eslint": "=8.37.0",
146
147
  "eslint-config-airbnb-base": "=15.0.0",
147
- "eslint-config-prettier": "=8.5.0",
148
- "eslint-plugin-import": "=2.26.0",
148
+ "eslint-config-prettier": "=8.8.0",
149
+ "eslint-plugin-dtslint": "=3.0.1",
150
+ "eslint-plugin-import": "=2.27.5",
149
151
  "eslint-plugin-mocha": "=10.1.0",
150
152
  "eslint-plugin-prettier": "4.2.1",
151
153
  "eslint-plugin-ramda": "2.5.1",
152
- "fantasy-land": "5.0.0",
154
+ "fantasy-land": "5.0.1",
153
155
  "fantasy-laws": "=2.0.1",
154
156
  "folktale": "=2.3.2",
155
- "glob": "=8.0.3",
156
- "husky": "8.0.1",
157
+ "glob": "=9.3.4",
158
+ "husky": "8.0.3",
157
159
  "istanbul": "=0.4.5",
158
- "jsdoc": "=3.6.11",
160
+ "jsdoc": "=4.0.2",
159
161
  "jsverify": "0.8.4",
160
162
  "license-cli": "1.1.6",
161
- "lint-staged": "13.0.3",
162
- "mocha": "=10.0.0",
163
- "mocha-junit-reporter": "2.0.2",
163
+ "lint-staged": "13.2.0",
164
+ "mocha": "=10.2.0",
165
+ "mocha-junit-reporter": "2.2.0",
164
166
  "mocha-multi-reporters": "1.5.1",
165
167
  "monet": "0.9.3",
166
168
  "nyc": "15.1.0",
167
- "prettier": "=2.7.1",
169
+ "prettier": "=2.8.7",
168
170
  "process": "=0.11.10",
169
- "ramda": "=0.28.0",
171
+ "ramda": "=0.29.0",
170
172
  "ramda-fantasy": "=0.8.0",
171
- "regenerator-runtime": "=0.13.9",
172
- "rimraf": "3.0.2",
173
+ "regenerator-runtime": "=0.13.11",
174
+ "rimraf": "4.4.1",
173
175
  "sanctuary-show": "3.0.0",
174
- "sinon": "=14.0.0",
175
- "terser-webpack-plugin": "5.3.6",
176
- "testem": "=3.9.0",
177
- "tslint": "=6.1.3",
178
- "typescript": "=4.8.3",
179
- "webpack": "=5.74.0",
180
- "webpack-cli": "4.10.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
+ "taffydb": "npm:@jsdoc/salty@0.2.1"
181
183
  },
182
184
  "browserslist": "> 0.25%, ie 10, ie 11, not op_mini all",
183
185
  "tonicExampleFilename": "tonicExample.js",
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/index.js CHANGED
@@ -161,6 +161,7 @@ export { default as toArray } from './toArray';
161
161
  export { default as allUnique } from './allUnique';
162
162
  export { default as notAllUnique } from './notAllUnique';
163
163
  export { default as sortByProps } from './sortByProps';
164
+ export { default as sortByProp } from './sortByProp';
164
165
  export { default as sortByPaths } from './sortByPaths';
165
166
  export { default as skipTake } from './skipTake';
166
167
  export { default as rangeStep } from './rangeStep';
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,21 +1,4 @@
1
- import {
2
- type,
3
- is,
4
- F as stubFalse,
5
- either,
6
- identical,
7
- pipe,
8
- curryN,
9
- } from 'ramda';
10
-
11
- let GeneratorFunction = null;
12
- let legacyCheck = null;
13
- try {
14
- GeneratorFunction = new Function('return function* () {}')().constructor; // eslint-disable-line no-new-func
15
- legacyCheck = is(GeneratorFunction);
16
- } catch (e) {
17
- legacyCheck = stubFalse;
18
- }
1
+ import { type, identical, pipe, curryN } from 'ramda';
19
2
 
20
3
  /**
21
4
  * Checks if input value is `Generator Function`.
@@ -37,7 +20,7 @@ try {
37
20
  */
38
21
  const isGeneratorFunction = curryN(
39
22
  1,
40
- either(pipe(type, identical('GeneratorFunction')), legacyCheck)
23
+ pipe(type, identical('GeneratorFunction'))
41
24
  );
42
25
 
43
26
  export default isGeneratorFunction;
@@ -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
  */
@@ -0,0 +1,45 @@
1
+ import { __, append, identity, useWith } from 'ramda';
2
+
3
+ import sortByProps from './sortByProps';
4
+
5
+ /**
6
+ * Sort a list of objects by a property.
7
+ *
8
+ * @func sortByProp
9
+ * @memberOf RA
10
+ * @since {@link https://char0n.github.io/ramda-adjunct/3.4.0|v3.4.0}
11
+ * @category List
12
+ * @sig k -> [{k: v}] -> [{k: v}]
13
+ * @param {Array.<string>} prop The property in the list param to sort by
14
+ * @param {Array.<object>} list A list of objects to be sorted
15
+ * @return {Array.<object>} A new list sorted by the property in the prop param
16
+ * @example
17
+ *
18
+ * // sorting list of tuples
19
+ * const sortByFirstItem = sortByProp(0);
20
+ * const listOfTuples = [[-1, 1], [-2, 2], [-3, 3]];
21
+ * sortByFirstItem(listOfTuples); // => [[-3, 3], [-2, 2], [-1, 1]]
22
+ *
23
+ * // sorting list of objects
24
+ * const sortByName = sortByProp('name');
25
+ * const alice = {
26
+ * name: 'ALICE',
27
+ * age: 101,
28
+ * };
29
+ * const bob = {
30
+ * name: 'Bob',
31
+ * age: -10,
32
+ * };
33
+ * const clara = {
34
+ * name: 'clara',
35
+ * age: 314.159,
36
+ * };
37
+ * const people = [clara, bob, alice];
38
+ * sortByName(people); // => [alice, bob, clara]
39
+ */
40
+
41
+ const addValueInAnArray = append(__, []);
42
+
43
+ const sortByProp = useWith(sortByProps, [addValueInAnArray, identity]);
44
+
45
+ export default sortByProp;
@@ -1,4 +1,4 @@
1
- import { reduce, either, curry, prop, sort, comparator, map, lt } from 'ramda';
1
+ import { comparator, curry, either, lt, map, prop, reduce, sort } from 'ramda';
2
2
 
3
3
  /**
4
4
  * Sort a list of objects by a list of props (if first prop value is equivalent, sort by second, etc).
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;