ramda-adjunct 3.3.0 → 3.4.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 (480) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +1 -1
  3. package/dist/RA.node.js +163 -1571
  4. package/dist/RA.node.min.js +1 -1
  5. package/dist/RA.web.js +163 -1571
  6. package/dist/RA.web.min.js +1 -1
  7. package/dist/RA.web.standalone.js +164 -1571
  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 +1 -1
  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 +1 -10
  33. package/es/divideNum.js +1 -1
  34. package/es/dropArgs.js +1 -1
  35. package/es/ensureArray.js +1 -1
  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 +1 -12
  43. package/es/flattenPath.js +1 -1
  44. package/es/flattenProp.js +1 -1
  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 +0 -12
  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 +0 -10
  59. package/es/internal/ponyfills/Promise.any.js +3 -31
  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 +1 -0
  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 +1 -1
  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 +1 -1
  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 +1 -0
  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 +1 -9
  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 +1 -1
  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 +1 -1
  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 +1 -3
  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 +1 -1
  195. package/es/rangeStep.js +1 -1
  196. package/es/reduceIndexed.js +1 -1
  197. package/es/reduceP.js +4 -16
  198. package/es/reduceRightP.js +6 -19
  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 +3 -11
  215. package/es/spreadPath.js +1 -1
  216. package/es/spreadProp.js +1 -1
  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 -4
  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 +1 -5
  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 +0 -15
  262. package/lib/divideNum.js +0 -2
  263. package/lib/dropArgs.js +0 -2
  264. package/lib/ensureArray.js +0 -4
  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 +1 -14
  272. package/lib/flattenPath.js +0 -2
  273. package/lib/flattenProp.js +0 -4
  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 +0 -18
  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 +0 -14
  292. package/lib/internal/ponyfills/Promise.any.js +3 -36
  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 +1 -2
  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 +0 -2
  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 +0 -2
  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 +0 -4
  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 +1 -2
  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 +0 -16
  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 +0 -4
  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 +0 -4
  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 +0 -4
  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 +0 -2
  430. package/lib/rangeStep.js +0 -4
  431. package/lib/reduceIndexed.js +0 -2
  432. package/lib/reduceP.js +3 -21
  433. package/lib/reduceRightP.js +4 -24
  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 +1 -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 +3 -13
  450. package/lib/spreadPath.js +0 -2
  451. package/lib/spreadProp.js +0 -4
  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 +0 -2
  461. package/lib/toNumber.js +0 -4
  462. package/lib/toUinteger32.js +1 -2
  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 +30 -28
  474. package/src/index.js +1 -0
  475. package/src/isGeneratorFunction.js +2 -19
  476. package/src/sortByProp.js +45 -0
  477. package/src/sortByProps.js +1 -1
  478. package/types/.eslintrc.js +23 -0
  479. package/types/dtslint.eslint.js +13 -0
  480. package/types/index.d.ts +24 -5
package/es/mergeProps.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { curryN, pipe, mergeAll, props } from 'ramda';
2
+
2
3
  /**
3
4
  * Functional equivalent of merging object properties with object spread operator.
4
5
  *
@@ -21,6 +22,5 @@ import { curryN, pipe, mergeAll, props } from 'ramda';
21
22
  * { ...obj.foo, ...obj.bar }; //=> { fooInner: 1, barInner: 2 }
22
23
  * RA.mergeProps(['foo', 'bar'], obj); //=> { fooInner: 1, barInner: 2 }
23
24
  */
24
-
25
25
  var mergeProps = curryN(2, pipe(props, mergeAll));
26
26
  export default mergeProps;
package/es/move.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { compose, curry, insert, nth, remove } from 'ramda';
2
+
2
3
  /**
3
4
  * Returns a new list with the item at the position `fromIdx` moved to the position `toIdx`. If the
4
5
  * `toIdx` is out of the `list` range, the item will be placed at the last position of the `list`.
@@ -18,7 +19,6 @@ import { compose, curry, insert, nth, remove } from 'ramda';
18
19
  * const list = ['a', 'b', 'c', 'd', 'e'];
19
20
  * RA.move(1, 3, list) //=> ['a', 'c', 'd', 'b', 'e']
20
21
  */
21
-
22
22
  var move = curry(function (fromIdx, toIdx, list) {
23
23
  return compose(insert(toIdx, nth(fromIdx, list)), remove(fromIdx, 1))(list);
24
24
  });
package/es/nand.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { and, complement } from 'ramda';
2
+
2
3
  /**
3
4
  * Returns false if both arguments are truthy; true otherwise.
4
5
  *
@@ -21,7 +22,6 @@ import { and, complement } from 'ramda';
21
22
  * RA.nand(0, 1.0); //=> true
22
23
  * RA.nand(0, 0); //=> true
23
24
  */
24
-
25
25
  var nand = complement(and); // eslint-disable-line ramda/complement-simplification
26
26
 
27
27
  export default nand;
package/es/neither.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { curry, compose, complement, either } from 'ramda';
2
- /* eslint-disable max-len */
3
2
 
3
+ /* eslint-disable max-len */
4
4
  /**
5
5
  * A function which calls the two provided functions and returns the complement of `||`ing the
6
6
  * results.
@@ -32,8 +32,6 @@ import { curry, compose, complement, either } from 'ramda';
32
32
  * f(11); //=> false
33
33
  * f(9); //=> true
34
34
  */
35
-
36
35
  /* eslint-enable max-len */
37
-
38
36
  var neither = curry(compose(complement, either));
39
37
  export default neither;
package/es/noneP.js CHANGED
@@ -2,6 +2,7 @@ import { curryN, map, pipe } from 'ramda';
2
2
  import allP from './allP';
3
3
  import rejectP from './rejectP';
4
4
  import resolveP from './resolveP';
5
+
5
6
  /**
6
7
  * Returns a Promise that is resolved with an array of reasons when all of the provided Promises reject, or rejected when any Promise is resolved.
7
8
  * This pattern is like allP, but fulfillments and rejections are transposed - rejections become the fulfillment values and vice versa.
@@ -21,7 +22,6 @@ import resolveP from './resolveP';
21
22
  * RA.noneP([Promise.reject(), Promise.resolve('hello world')]); //=> Promise('hello world')
22
23
  * RA.noneP([Promise.reject(), 'hello world']); //=> Promise('hello world')
23
24
  */
24
-
25
25
  var noneP = curryN(1, pipe(map(resolveP), map(function (p) {
26
26
  return p.then(rejectP, resolveP);
27
27
  }), allP));
package/es/nonePass.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { complement, compose, anyPass, curryN } from 'ramda';
2
+
2
3
  /**
3
4
  * Takes a list of predicates and returns a predicate that returns true for a given list of
4
5
  * arguments if none of the provided predicates are satisfied by those arguments. It is the
@@ -26,6 +27,5 @@ import { complement, compose, anyPass, curryN } from 'ramda';
26
27
  * f(11); //=> false
27
28
  * f(9); //=> true
28
29
  */
29
-
30
30
  var nonePass = curryN(1, compose(complement, anyPass));
31
31
  export default nonePass;
package/es/noop.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { always } from 'ramda';
2
2
  import stubUndefined from './stubUndefined';
3
+
3
4
  /**
4
5
  * A function that performs no operations.
5
6
  *
@@ -14,6 +15,5 @@ import stubUndefined from './stubUndefined';
14
15
  * RA.noop(); //=> undefined
15
16
  * RA.noop(1, 2, 3); //=> undefined
16
17
  */
17
-
18
18
  var noop = always(stubUndefined());
19
19
  export default noop;
package/es/nor.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { or, complement } from 'ramda';
2
+
2
3
  /**
3
4
  * Returns true if both arguments are falsy; false otherwise.
4
5
  *
@@ -22,7 +23,6 @@ import { or, complement } from 'ramda';
22
23
  * RA.nor(0, 1); //=> false
23
24
  * RA.nor(0, 0); //=> true
24
25
  */
25
-
26
26
  var nor = complement(or); // eslint-disable-line ramda/complement-simplification
27
27
 
28
28
  export default nor;
package/es/notAllPass.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { curry, complement, compose, allPass } from 'ramda';
2
+
2
3
  /**
3
4
  * Takes a list of predicates and returns a predicate that returns true for a given list of
4
5
  * arguments if one or more of the provided predicates is not satisfied by those arguments. It is
@@ -26,6 +27,5 @@ import { curry, complement, compose, allPass } from 'ramda';
26
27
  * f(11); //=> true
27
28
  * f(9); //=> true
28
29
  */
29
-
30
30
  var notAllPass = curry(compose(complement, allPass));
31
31
  export default notAllPass;
@@ -1,5 +1,6 @@
1
1
  import { complement } from 'ramda';
2
2
  import allUnique from './allUnique';
3
+
3
4
  /**
4
5
  * Returns true if at least one item of the list is repeated. `R.equals` is used to determine equality.
5
6
  *
@@ -18,6 +19,5 @@ import allUnique from './allUnique';
18
19
  * RA.notAllUnique([]); //=> false
19
20
  *
20
21
  */
21
-
22
22
  var notAllUnique = complement(allUnique);
23
23
  export default notAllUnique;
package/es/notBoth.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { curry, compose, complement, both } from 'ramda';
2
- /* eslint-disable max-len */
3
2
 
3
+ /* eslint-disable max-len */
4
4
  /**
5
5
  * A function which calls the two provided functions and returns the complement of `&&`ing the
6
6
  * results.
@@ -32,8 +32,6 @@ import { curry, compose, complement, both } from 'ramda';
32
32
  * f(11); //=> true
33
33
  * f(9); //=> true
34
34
  */
35
-
36
35
  /* eslint-enable max-len */
37
-
38
36
  var notBoth = curry(compose(complement, both));
39
37
  export default notBoth;
package/es/notEqual.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { complement, equals } from 'ramda';
2
+
2
3
  /**
3
4
  * Returns `true` if its arguments are not equivalent, `false` otherwise. Handles
4
5
  * cyclical data structures.
@@ -25,6 +26,5 @@ import { complement, equals } from 'ramda';
25
26
  * const b = {}; b.v = b;
26
27
  * RA.notEqual(a, b); //=> false
27
28
  */
28
-
29
29
  var notEqual = complement(equals);
30
30
  export default notEqual;
package/es/omitBy.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { complement, identity, pickBy, useWith } from 'ramda';
2
- /* eslint-disable max-len */
3
2
 
3
+ /* eslint-disable max-len */
4
4
  /**
5
5
  * Returns a partial copy of an object containing only the keys
6
6
  * that don't satisfy the supplied predicate.
@@ -19,8 +19,6 @@ import { complement, identity, pickBy, useWith } from 'ramda';
19
19
  * const isLowerCase = (val, key) => key.toLowerCase() === key;
20
20
  * RA.omitBy(isLowerCase, {a: 1, b: 2, A: 3, B: 4}); //=> {A: 3, B: 4}
21
21
  */
22
-
23
22
  /* eslint-enable max-len */
24
-
25
23
  var omitBy = useWith(pickBy, [complement, identity]);
26
24
  export default omitBy;
package/es/omitIndexes.js CHANGED
@@ -1,9 +1,11 @@
1
- import { includes, curry, addIndex, reject } from 'ramda'; // helpers
1
+ import { includes, curry, addIndex, reject } from 'ramda';
2
2
 
3
+ // helpers
3
4
  var rejectIndexed = addIndex(reject);
4
5
  var containsIndex = curry(function (indexes, val, index) {
5
6
  return includes(index, indexes);
6
7
  });
8
+
7
9
  /**
8
10
  * Returns a partial copy of an array omitting the indexes specified.
9
11
  *
@@ -20,7 +22,6 @@ var containsIndex = curry(function (indexes, val, index) {
20
22
  *
21
23
  * RA.omitIndexes([-1, 1, 3], ['a', 'b', 'c', 'd']); //=> ['a', 'c']
22
24
  */
23
-
24
25
  var omitIndexes = curry(function (indexes, list) {
25
26
  return rejectIndexed(containsIndex(indexes), list);
26
27
  });
package/es/overlaps.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { pipe, intersection, isEmpty, curryN } from 'ramda';
2
2
  import isNotEmpty from './isNotEmpty';
3
+
3
4
  /**
4
5
  * Returns true if two lists have at least one element common to both lists.
5
6
  *
@@ -23,7 +24,6 @@ var overlaps = curryN(2, function (list1, list2) {
23
24
  if (isEmpty(list1)) {
24
25
  return true;
25
26
  }
26
-
27
27
  return pipe(intersection, isNotEmpty)(list1, list2);
28
28
  });
29
29
  export default overlaps;
package/es/padCharsEnd.js CHANGED
@@ -3,6 +3,7 @@ import ponyfill from './internal/ponyfills/String.padEnd';
3
3
  import isFunction from './isFunction';
4
4
  export var padEndPonyfill = curry(ponyfill);
5
5
  export var padEndInvoker = flip(invoker(2, 'padEnd'));
6
+
6
7
  /**
7
8
  * The function pads the current string with a given string
8
9
  * (repeated, if needed) so that the resulting string reaches a given length.
@@ -26,6 +27,5 @@ export var padEndInvoker = flip(invoker(2, 'padEnd'));
26
27
  * RA.padCharsEnd('foo', 10, 'abc'); // => 'abcfoofoof'
27
28
  * RA.padCharsEnd('123456', 6, 'abc'); // => 'abc123'
28
29
  */
29
-
30
30
  var padCharsEnd = isFunction(String.prototype.padEnd) ? padEndInvoker : padEndPonyfill;
31
31
  export default padCharsEnd;
@@ -3,6 +3,7 @@ import isFunction from './isFunction';
3
3
  import ponyfill from './internal/ponyfills/String.padStart';
4
4
  export var padStartInvoker = flip(invoker(2, 'padStart'));
5
5
  export var padStartPonyfill = curry(ponyfill);
6
+
6
7
  /**
7
8
  * The function pads the current string with a given string
8
9
  * (repeated, if needed) so that the resulting string reaches a given length.
@@ -24,6 +25,5 @@ export var padStartPonyfill = curry(ponyfill);
24
25
  * RA.padCharsStart('foo', 10, 'abc'); // => 'foofoofabc'
25
26
  * RA.padCharsStart('123456', 6, 'abc'); // => '123abc'
26
27
  */
27
-
28
28
  var padCharsStart = isFunction(String.prototype.padStart) ? padStartInvoker : padStartPonyfill;
29
29
  export default padCharsStart;
package/es/padEnd.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import padCharsEnd from './padCharsEnd';
2
+
2
3
  /**
3
4
  * The function pads the current string with an empty string
4
5
  * so that the resulting string reaches a given length.
@@ -19,6 +20,5 @@ import padCharsEnd from './padCharsEnd';
19
20
  *
20
21
  * RA.padEnd(3, 'a'); // => 'a '
21
22
  */
22
-
23
23
  var padEnd = padCharsEnd(' ');
24
24
  export default padEnd;
package/es/padStart.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import padCharsStart from './padCharsStart';
2
+
2
3
  /**
3
4
  * Pads string on the left side if it's shorter than length.
4
5
  *
@@ -17,6 +18,5 @@ import padCharsStart from './padCharsStart';
17
18
  *
18
19
  * RA.padStart(3, 'a'); // => ' a'
19
20
  */
20
-
21
21
  var padStart = padCharsStart(' ');
22
22
  export default padStart;
package/es/pathNotEq.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { pathEq, complement } from 'ramda';
2
- /* eslint-disable max-len */
3
2
 
3
+ /* eslint-disable max-len */
4
4
  /**
5
5
  * Determines whether a nested path on an object doesn't have a specific value,
6
6
  * in R.equals terms. Most likely used to filter a list.
@@ -25,8 +25,6 @@ import { pathEq, complement } from 'ramda';
25
25
  * const isFamous = R.pathNotEq(['address', 'zipCode'], 90210);
26
26
  * R.filter(isFamous, users); //=> [ user2, user3 ]
27
27
  */
28
-
29
28
  /* eslint-enable max-len */
30
-
31
29
  var pathNotEq = complement(pathEq);
32
30
  export default pathNotEq;
package/es/pathOrLazy.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { curryN, identical, partial, pathOr, unary, when } from 'ramda';
2
+
2
3
  /**
3
4
  * If the given, non-null object has a value at the given path, returns the value at that path.
4
5
  * Otherwise returns the result of invoking the provided function with the object.
@@ -18,7 +19,6 @@ import { curryN, identical, partial, pathOr, unary, when } from 'ramda';
18
19
  * RA.pathOrLazy(() => 'N/A', ['a', 'b'], {a: {b: 2}}); //=> 2
19
20
  * RA.pathOrLazy(() => 'N/A', ['a', 'b'], {c: {b: 2}}); //=> "N/A"
20
21
  */
21
-
22
22
  var pathOrLazy = curryN(3, function (defaultFn, path, obj) {
23
23
  return when(identical(defaultFn), partial(unary(defaultFn), [obj]), pathOr(defaultFn, path, obj));
24
24
  });
package/es/paths.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { curry, ap, path, __ } from 'ramda';
2
+
2
3
  /**
3
4
  * Acts as multiple path: arrays of paths in, array of values out. Preserves order.
4
5
  *
@@ -20,7 +21,6 @@ import { curry, ap, path, __ } from 'ramda';
20
21
  *
21
22
  * RA.paths([['a', 'b', 'c'], ['x']], obj); //=> [1, 2]
22
23
  */
23
-
24
24
  var paths = curry(function (ps, obj) {
25
25
  return ap([path(__, obj)], ps);
26
26
  });
package/es/pickIndexes.js CHANGED
@@ -1,9 +1,11 @@
1
- import { filter, addIndex, curry, includes } from 'ramda'; // helpers
1
+ import { filter, addIndex, curry, includes } from 'ramda';
2
2
 
3
+ // helpers
3
4
  var filterIndexed = addIndex(filter);
4
5
  var containsIndex = curry(function (indexes, val, index) {
5
6
  return includes(index, indexes);
6
7
  });
8
+
7
9
  /**
8
10
  * Picks values from list by indexes.
9
11
  *
@@ -23,7 +25,6 @@ var containsIndex = curry(function (indexes, val, index) {
23
25
  *
24
26
  * RA.pickIndexes([0, 2], ['a', 'b', 'c']); //=> ['a', 'c']
25
27
  */
26
-
27
28
  var pickIndexes = curry(function (indexes, list) {
28
29
  return filterIndexed(containsIndex(indexes), list);
29
30
  });
package/es/propNotEq.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { propEq, complement } from 'ramda';
2
+
2
3
  /**
3
4
  * Returns true if the specified object property is not equal,
4
5
  * in R.equals terms, to the given value; false otherwise.
@@ -24,6 +25,5 @@ import { propEq, complement } from 'ramda';
24
25
  *
25
26
  * R.filter(hasNotBrownHair, kids); //=> [abby, alois]
26
27
  */
27
-
28
28
  var propNotEq = complement(propEq);
29
29
  export default propNotEq;
package/es/rangeStep.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { curryN, map, range, always } from 'ramda';
2
2
  import floor from './floor';
3
+
3
4
  /**
4
5
  * Creates an array of numbers (positive and/or negative) progressing from start up to, but not including, end.
5
6
  *
@@ -25,7 +26,6 @@ import floor from './floor';
25
26
  * RA.rangeStep(0, 1, 4); // => [1, 1, 1]
26
27
  * RA.rangeStep(1, 0, 0); // => []
27
28
  */
28
-
29
29
  var rangeStep = curryN(3, function (step, from, to) {
30
30
  var callback = step === 0 ? always(from) : function (n) {
31
31
  return from + step * n;
@@ -1,4 +1,5 @@
1
1
  import { addIndex, reduce } from 'ramda';
2
+
2
3
  /**
3
4
  * {@link http://ramdajs.com/docs/#reduce|R.reduce} function that more closely resembles Array.prototype.reduce.
4
5
  * It takes two new parameters to its callback function: the current index, and the entire list.
@@ -25,6 +26,5 @@ import { addIndex, reduce } from 'ramda';
25
26
  * reduceIndexed((acc, val, idx, list) => acc + '-' + val + idx, '', initialList);
26
27
  * //=> "-f0-o1-o2-b3-a4-r5"
27
28
  */
28
-
29
29
  var reduceIndexed = addIndex(reduce);
30
30
  export default reduceIndexed;
package/es/reduceP.js CHANGED
@@ -1,21 +1,15 @@
1
1
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
-
3
2
  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."); }
4
-
5
3
  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); }
6
-
7
4
  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; }
8
-
9
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
10
-
5
+ 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; } }
11
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
-
13
7
  import { curryN, reduce, length } from 'ramda';
14
8
  import isUndefined from './isUndefined';
15
9
  import resolveP from './resolveP';
16
10
  import allP from './allP';
17
- /* eslint-disable max-len */
18
11
 
12
+ /* eslint-disable max-len */
19
13
  /**
20
14
  * Given an `Iterable`(arrays are `Iterable`), or a promise of an `Iterable`,
21
15
  * which produces promises (or a mix of promises and values),
@@ -79,29 +73,23 @@ import allP from './allP';
79
73
  * ); // => Promise(10)
80
74
  *
81
75
  */
82
-
83
76
  /* esline-enable max-len */
84
-
85
77
  var reduceP = curryN(3, function (fn, acc, list) {
86
78
  return resolveP(list).then(function (iterable) {
87
79
  var listLength = length(iterable);
88
-
89
80
  if (listLength === 0) {
90
81
  return acc;
91
82
  }
92
-
93
83
  var reducer = reduce(function (accP, currentValueP) {
94
84
  return accP.then(function (previousValue) {
95
85
  return allP([previousValue, currentValueP]);
96
86
  }).then(function (_ref) {
97
87
  var _ref2 = _slicedToArray(_ref, 2),
98
- previousValue = _ref2[0],
99
- currentValue = _ref2[1];
100
-
88
+ previousValue = _ref2[0],
89
+ currentValue = _ref2[1];
101
90
  if (isUndefined(previousValue) && listLength === 1) {
102
91
  return currentValue;
103
92
  }
104
-
105
93
  return fn(previousValue, currentValue);
106
94
  });
107
95
  });
@@ -1,23 +1,18 @@
1
1
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
-
3
2
  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."); }
4
-
5
3
  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); }
6
-
7
4
  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; }
8
-
9
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
10
-
5
+ 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; } }
11
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
-
13
7
  import { curryN, pipe, equals, reduceRight, length, concat } from 'ramda';
14
8
  import isUndefined from './isUndefined';
15
9
  import resolveP from './resolveP';
16
- import allP from './allP'; // in older ramda versions the order of the arguments is flipped
10
+ import allP from './allP';
17
11
 
12
+ // in older ramda versions the order of the arguments is flipped
18
13
  var flipArgs = pipe(reduceRight(concat, ''), equals('ba'))(['a', 'b']);
19
- /* eslint-disable max-len */
20
14
 
15
+ /* eslint-disable max-len */
21
16
  /**
22
17
  * Given an `Iterable`(arrays are `Iterable`), or a promise of an `Iterable`,
23
18
  * which produces promises (or a mix of promises and values),
@@ -74,21 +69,16 @@ var flipArgs = pipe(reduceRight(concat, ''), equals('ba'))(['a', 'b']);
74
69
  * ); // => Promise(10)
75
70
  *
76
71
  */
77
-
78
72
  /* esline-enable max-len */
79
-
80
73
  var reduceRightP = curryN(3, function (fn, acc, list) {
81
74
  return resolveP(list).then(function (iterable) {
82
75
  var listLength = length(iterable);
83
-
84
76
  if (listLength === 0) {
85
77
  return acc;
86
78
  }
87
-
88
79
  var reducer = reduceRight(function (arg1, arg2) {
89
80
  var accP;
90
81
  var currentValueP;
91
-
92
82
  if (flipArgs) {
93
83
  accP = arg1;
94
84
  currentValueP = arg2;
@@ -96,18 +86,15 @@ var reduceRightP = curryN(3, function (fn, acc, list) {
96
86
  accP = arg2;
97
87
  currentValueP = arg1;
98
88
  }
99
-
100
89
  return accP.then(function (previousValue) {
101
90
  return allP([previousValue, currentValueP]);
102
91
  }).then(function (_ref) {
103
92
  var _ref2 = _slicedToArray(_ref, 2),
104
- previousValue = _ref2[0],
105
- currentValue = _ref2[1];
106
-
93
+ previousValue = _ref2[0],
94
+ currentValue = _ref2[1];
107
95
  if (isUndefined(previousValue) && listLength === 1) {
108
96
  return currentValue;
109
97
  }
110
-
111
98
  return fn(currentValue, previousValue);
112
99
  });
113
100
  });
package/es/rejectP.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { bind } from 'ramda';
2
+
2
3
  /**
3
4
  * Composable shortcut for `Promise.reject`.
4
5
  *
@@ -18,6 +19,5 @@ import { bind } from 'ramda';
18
19
  * RA.rejectP('a'); //=> Promise('a')
19
20
  * RA.rejectP([1, 2, 3]); //=> Promise([1, 2, 3])
20
21
  */
21
-
22
22
  var rejectP = bind(Promise.reject, Promise);
23
23
  export default rejectP;
@@ -1,5 +1,6 @@
1
1
  import { curry, equals, when } from 'ramda';
2
2
  import renameKeysWith from './renameKeysWith';
3
+
3
4
  /**
4
5
  * Creates a new object with the own properties of the provided object, but the
5
6
  * key `key` renamed according to logic of renaming function.
@@ -21,7 +22,6 @@ import renameKeysWith from './renameKeysWith';
21
22
  *
22
23
  * RA.renameKeyWith(R.concat('a'), 'A', { A: 1 }) //=> { aA: 1 }
23
24
  */
24
-
25
25
  var renameKeyWith = curry(function (fn, key, obj) {
26
26
  return renameKeysWith(when(equals(key), fn), obj);
27
27
  });
package/es/renameKeys.js CHANGED
@@ -1,15 +1,14 @@
1
1
  import { curry, has } from 'ramda';
2
2
  import renameKeysWith from './renameKeysWith';
3
-
4
3
  var valueOrKey = function valueOrKey(keysMap) {
5
4
  return function (key) {
6
5
  if (has(key, keysMap)) {
7
6
  return keysMap[key];
8
7
  }
9
-
10
8
  return key;
11
9
  };
12
10
  };
11
+
13
12
  /**
14
13
  * Creates a new object with the own properties of the provided object, but the
15
14
  * keys renamed according to the keysMap object as `{oldKey: newKey}`.
@@ -34,8 +33,6 @@ var valueOrKey = function valueOrKey(keysMap) {
34
33
  * RA.renameKeys({ firstName: 'name', type: 'kind', foo: 'bar' })(input);
35
34
  * //=> { name: 'Elisia', age: 22, kind: 'human' }
36
35
  */
37
-
38
-
39
36
  var renameKeys = curry(function (keysMap, obj) {
40
37
  return renameKeysWith(valueOrKey(keysMap), obj);
41
38
  });
@@ -1,4 +1,5 @@
1
1
  import { curry, toPairs, pipe, map, over, lensIndex, fromPairs } from 'ramda';
2
+
2
3
  /**
3
4
  * Creates a new object with the own properties of the provided object, but the
4
5
  * keys renamed according to logic of renaming function.
@@ -19,7 +20,6 @@ import { curry, toPairs, pipe, map, over, lensIndex, fromPairs } from 'ramda';
19
20
  *
20
21
  * RA.renameKeysWith(R.concat('a'), { A: 1, B: 2, C: 3 }) //=> { aA: 1, aB: 2, aC: 3 }
21
22
  */
22
-
23
23
  var renameKeysWith = curry(function (fn, obj) {
24
24
  return pipe(toPairs, map(over(lensIndex(0), fn)), fromPairs)(obj);
25
25
  });
package/es/repeatStr.js CHANGED
@@ -3,6 +3,7 @@ import ponyfill from './internal/ponyfills/String.repeat';
3
3
  import isFunction from './isFunction';
4
4
  export var repeatStrPonyfill = curry(ponyfill);
5
5
  export var repeatStrInvoker = flip(invoker(1, 'repeat'));
6
+
6
7
  /**
7
8
  * Constructs and returns a new string which contains the specified
8
9
  * number of copies of the string on which it was called, concatenated together.
@@ -19,6 +20,5 @@ export var repeatStrInvoker = flip(invoker(1, 'repeat'));
19
20
  *
20
21
  * RA.repeatStr('a', 3); //=> 'aaa'
21
22
  */
22
-
23
23
  var repeatStr = isFunction(String.prototype.repeat) ? repeatStrInvoker : repeatStrPonyfill;
24
24
  export default repeatStr;
package/es/replaceAll.js CHANGED
@@ -3,6 +3,7 @@ import isFunction from './isFunction';
3
3
  import ponyfill from './internal/ponyfills/String.replaceAll';
4
4
  export var replaceAllPonyfill = curryN(3, ponyfill);
5
5
  export var replaceAllInvoker = invoker(2, 'replaceAll');
6
+
6
7
  /**
7
8
  * Replaces all substring matches in a string with a replacement.
8
9
  *
@@ -24,6 +25,5 @@ export var replaceAllInvoker = invoker(2, 'replaceAll');
24
25
  * RA.replaceAll(/x/g, 'v', 'xxx'); //=> 'vvv'
25
26
  * RA.replaceAll(/x/, 'v', 'xxx'); //=> TypeError
26
27
  */
27
-
28
28
  var replaceAll = isFunction(String.prototype.replaceAll) ? replaceAllInvoker : replaceAllPonyfill;
29
29
  export default replaceAll;
package/es/resolveP.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { bind } from 'ramda';
2
- /* eslint-disable max-len */
3
2
 
3
+ /* eslint-disable max-len */
4
4
  /**
5
5
  * Composable shortcut for `Promise.resolve`.
6
6
  *
@@ -22,8 +22,6 @@ import { bind } from 'ramda';
22
22
  * RA.resolveP('a'); //=> Promise('a')
23
23
  * RA.resolveP([1, 2, 3]); //=> Promise([1, 2, 3])
24
24
  */
25
-
26
25
  /* eslint-enable max-len */
27
-
28
26
  var resolveP = bind(Promise.resolve, Promise);
29
27
  export default resolveP;
package/es/round.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { bind, curryN } from 'ramda';
2
+
2
3
  /**
3
4
  * Returns the value of a number rounded to the nearest integer.
4
5
  *