ramda-adjunct 4.1.1 → 5.0.1

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 (640) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +2 -2
  3. package/dist/RA.node.js +3623 -3140
  4. package/dist/RA.node.min.js +1 -2
  5. package/dist/RA.web.js +3623 -3140
  6. package/dist/RA.web.min.js +1 -2
  7. package/dist/RA.web.standalone.js +7433 -16469
  8. package/dist/RA.web.standalone.min.js +1 -2
  9. package/dist/package.json +1 -0
  10. package/es/allEqual.js +1 -1
  11. package/es/allIdentical.js +1 -1
  12. package/es/allSettledP.js +2 -2
  13. package/es/allUnique.js +1 -1
  14. package/es/anyP.js +2 -2
  15. package/es/argsPass.js +2 -2
  16. package/es/async.js +2 -2
  17. package/es/cata.js +1 -1
  18. package/es/compact.js +1 -1
  19. package/es/concatAll.js +1 -1
  20. package/es/copyKeys.js +7 -7
  21. package/es/curryRight.js +1 -1
  22. package/es/delayP.js +2 -2
  23. package/es/dispatch.js +8 -8
  24. package/es/ensureArray.js +1 -1
  25. package/es/escapeRegExp.js +1 -1
  26. package/es/fantasy-land/Identity.js +9 -10
  27. package/es/fantasy-land/traits.js +9 -9
  28. package/es/flattenDepth.js +6 -6
  29. package/es/flattenProp.js +1 -1
  30. package/es/fnull.js +2 -2
  31. package/es/index.js +228 -229
  32. package/es/internal/ap.js +2 -2
  33. package/es/internal/isCoercible.js +3 -3
  34. package/es/internal/isOfTypeObject.js +1 -1
  35. package/es/internal/makeFlat.js +1 -1
  36. package/es/internal/ponyfills/Array.from.js +9 -9
  37. package/es/internal/ponyfills/Math.trunc.js +1 -1
  38. package/es/internal/ponyfills/Number.isFinite.js +1 -1
  39. package/es/internal/ponyfills/Number.isInteger.js +1 -1
  40. package/es/internal/ponyfills/Number.isNaN.js +1 -1
  41. package/es/internal/ponyfills/Number.isSafeInteger.js +2 -2
  42. package/es/internal/ponyfills/Promise.allSettled.js +7 -7
  43. package/es/internal/ponyfills/Promise.any.js +24 -25
  44. package/es/internal/ponyfills/String.padEnd.js +3 -3
  45. package/es/internal/ponyfills/String.padStart.js +3 -3
  46. package/es/internal/ponyfills/String.repeat.js +2 -2
  47. package/es/internal/ponyfills/String.replaceAll.js +2 -2
  48. package/es/invoke.js +1 -1
  49. package/es/invokeArgs.js +2 -2
  50. package/es/isArray.js +1 -1
  51. package/es/isArrayLike.js +3 -3
  52. package/es/isBlank.js +1 -1
  53. package/es/isEmptyArray.js +1 -1
  54. package/es/isEven.js +2 -2
  55. package/es/isFalsy.js +1 -1
  56. package/es/isFinite.js +2 -2
  57. package/es/isFloat.js +2 -2
  58. package/es/isFunction.js +2 -2
  59. package/es/isIndexed.js +2 -2
  60. package/es/isInteger.js +2 -2
  61. package/es/isInteger32.js +1 -1
  62. package/es/isIterable.js +1 -1
  63. package/es/isNaN.js +2 -2
  64. package/es/isNaturalNumber.js +2 -2
  65. package/es/isNegative.js +1 -1
  66. package/es/isNonEmptyArray.js +2 -3
  67. package/es/isNonEmptyString.js +3 -4
  68. package/es/isNonNegative.js +1 -1
  69. package/es/isNonPositive.js +1 -1
  70. package/es/isNotArray.js +1 -1
  71. package/es/isNotArrayLike.js +1 -1
  72. package/es/isNotAsyncFunction.js +1 -1
  73. package/es/isNotBoolean.js +1 -1
  74. package/es/isNotDate.js +1 -1
  75. package/es/isNotFinite.js +1 -1
  76. package/es/isNotFloat.js +1 -1
  77. package/es/isNotFunction.js +1 -1
  78. package/es/isNotGeneratorFunction.js +1 -1
  79. package/es/isNotInteger.js +1 -1
  80. package/es/isNotMap.js +1 -1
  81. package/es/isNotNaN.js +1 -1
  82. package/es/isNotNilOrEmpty.js +1 -1
  83. package/es/isNotNull.js +1 -1
  84. package/es/isNotNumber.js +1 -1
  85. package/es/isNotObj.js +1 -1
  86. package/es/isNotObjLike.js +1 -1
  87. package/es/isNotPair.js +1 -1
  88. package/es/isNotPlainObj.js +1 -1
  89. package/es/isNotPrimitive.js +1 -1
  90. package/es/isNotRegExp.js +1 -1
  91. package/es/isNotSet.js +1 -1
  92. package/es/isNotString.js +1 -1
  93. package/es/isNotUndefined.js +1 -1
  94. package/es/isNotValidDate.js +1 -1
  95. package/es/isNotValidNumber.js +1 -1
  96. package/es/isObj.js +3 -3
  97. package/es/isObjLike.js +2 -2
  98. package/es/isOdd.js +1 -1
  99. package/es/isPair.js +1 -1
  100. package/es/isPlainObj.js +3 -3
  101. package/es/isPositive.js +1 -1
  102. package/es/isPrimitive.js +8 -8
  103. package/es/isPromise.js +1 -1
  104. package/es/isPrototypeOf.js +1 -1
  105. package/es/isSafeInteger.js +2 -2
  106. package/es/isSentinelValue.js +1 -1
  107. package/es/isSparseArray.js +1 -1
  108. package/es/isSymbol.js +1 -1
  109. package/es/isThenable.js +1 -1
  110. package/es/isUinteger32.js +1 -1
  111. package/es/isUndefined.js +1 -1
  112. package/es/isValidDate.js +2 -2
  113. package/es/isValidNumber.js +2 -2
  114. package/es/lastP.js +10 -10
  115. package/es/lengthEq.js +1 -1
  116. package/es/lengthGt.js +1 -1
  117. package/es/lengthGte.js +1 -1
  118. package/es/lengthLt.js +1 -1
  119. package/es/lengthLte.js +1 -1
  120. package/es/lengthNotEq.js +1 -1
  121. package/es/lensNotEq.js +1 -1
  122. package/es/lensNotSatisfy.js +1 -1
  123. package/es/lensSatisfies.js +1 -1
  124. package/es/lensTraverse.js +1 -1
  125. package/es/liftF.js +1 -1
  126. package/es/liftFN.js +1 -1
  127. package/es/mergePaths.js +1 -1
  128. package/es/mergeProp.js +1 -1
  129. package/es/noneP.js +3 -3
  130. package/es/noop.js +1 -1
  131. package/es/notAllUnique.js +1 -1
  132. package/es/overlaps.js +1 -2
  133. package/es/padCharsEnd.js +2 -2
  134. package/es/padCharsStart.js +2 -2
  135. package/es/padEnd.js +1 -1
  136. package/es/padStart.js +1 -1
  137. package/es/rangeStep.js +1 -1
  138. package/es/reduceP.js +8 -8
  139. package/es/reduceRightP.js +8 -8
  140. package/es/renameKey.js +5 -5
  141. package/es/renameKeyWith.js +1 -1
  142. package/es/renameKeys.js +1 -1
  143. package/es/repeatStr.js +2 -2
  144. package/es/replaceAll.js +2 -2
  145. package/es/sign.js +2 -2
  146. package/es/sortByProp.js +1 -1
  147. package/es/sortByProps.js +5 -5
  148. package/es/spreadProp.js +1 -1
  149. package/es/toArray.js +3 -3
  150. package/es/toNumber.js +1 -1
  151. package/es/trimCharsEnd.js +1 -1
  152. package/es/trimCharsStart.js +1 -1
  153. package/es/trimEnd.js +2 -2
  154. package/es/trimStart.js +2 -2
  155. package/es/trunc.js +2 -2
  156. package/es/unzipObjWith.js +1 -1
  157. package/lib/Y.js +1 -2
  158. package/lib/allEqual.js +4 -4
  159. package/lib/allEqualTo.js +1 -2
  160. package/lib/allIdentical.js +3 -4
  161. package/lib/allIdenticalTo.js +1 -2
  162. package/lib/allP.js +1 -2
  163. package/lib/allSettledP.js +5 -7
  164. package/lib/allUnique.js +3 -4
  165. package/lib/anyP.js +9 -11
  166. package/lib/appendFlipped.js +1 -2
  167. package/lib/argsPass.js +4 -5
  168. package/lib/async.js +4 -5
  169. package/lib/cata.js +3 -4
  170. package/lib/catchP.js +1 -2
  171. package/lib/ceil.js +1 -2
  172. package/lib/compact.js +3 -4
  173. package/lib/concatAll.js +3 -4
  174. package/lib/concatRight.js +1 -2
  175. package/lib/copyKeys.js +9 -10
  176. package/lib/curryRight.js +3 -4
  177. package/lib/curryRightN.js +1 -2
  178. package/lib/defaultWhen.js +1 -2
  179. package/lib/delayP.js +4 -5
  180. package/lib/dispatch.js +45 -46
  181. package/lib/divideNum.js +1 -2
  182. package/lib/dropArgs.js +1 -2
  183. package/lib/ensureArray.js +3 -4
  184. package/lib/escapeRegExp.js +3 -4
  185. package/lib/fantasy-land/Identity.js +12 -14
  186. package/lib/fantasy-land/mapping.js +20 -40
  187. package/lib/fantasy-land/traits.js +19 -25
  188. package/lib/fantasy-land/util.js +4 -8
  189. package/lib/filterIndexed.js +1 -2
  190. package/lib/findOr.js +1 -2
  191. package/lib/flattenDepth.js +8 -9
  192. package/lib/flattenPath.js +1 -2
  193. package/lib/flattenProp.js +3 -4
  194. package/lib/floor.js +1 -2
  195. package/lib/fnull.js +4 -5
  196. package/lib/inRange.js +2 -3
  197. package/lib/included.js +1 -2
  198. package/lib/index.js +216 -218
  199. package/lib/internal/ap.js +7 -8
  200. package/lib/internal/compareLength.js +1 -2
  201. package/lib/internal/isCoercible.js +5 -6
  202. package/lib/internal/isOfTypeObject.js +2 -3
  203. package/lib/internal/makeFlat.js +3 -4
  204. package/lib/internal/ponyfills/Array.from.js +11 -12
  205. package/lib/internal/ponyfills/Math.sign.js +1 -2
  206. package/lib/internal/ponyfills/Math.trunc.js +3 -4
  207. package/lib/internal/ponyfills/Number.MAX_SAFE_INTEGER.js +1 -2
  208. package/lib/internal/ponyfills/Number.MIN_SAFE_INTEGER.js +1 -2
  209. package/lib/internal/ponyfills/Number.isFinite.js +3 -4
  210. package/lib/internal/ponyfills/Number.isInteger.js +3 -4
  211. package/lib/internal/ponyfills/Number.isNaN.js +3 -4
  212. package/lib/internal/ponyfills/Number.isSafeInteger.js +5 -6
  213. package/lib/internal/ponyfills/Promise.allSettled.js +9 -10
  214. package/lib/internal/ponyfills/Promise.any.js +27 -30
  215. package/lib/internal/ponyfills/String.padEnd.js +6 -7
  216. package/lib/internal/ponyfills/String.padStart.js +6 -7
  217. package/lib/internal/ponyfills/String.repeat.js +4 -5
  218. package/lib/internal/ponyfills/String.replaceAll.js +4 -5
  219. package/lib/internal/ponyfills/String.trimEnd.js +1 -2
  220. package/lib/internal/ponyfills/String.trimStart.js +1 -2
  221. package/lib/invoke.js +3 -4
  222. package/lib/invokeArgs.js +4 -5
  223. package/lib/isArray.js +3 -4
  224. package/lib/isArrayLike.js +6 -7
  225. package/lib/isAsyncFunction.js +1 -2
  226. package/lib/isBigInt.js +1 -2
  227. package/lib/isBlank.js +3 -4
  228. package/lib/isBoolean.js +1 -2
  229. package/lib/isDate.js +1 -2
  230. package/lib/isEmptyArray.js +3 -4
  231. package/lib/isEmptyString.js +1 -2
  232. package/lib/isError.js +1 -2
  233. package/lib/isEven.js +4 -5
  234. package/lib/isFalse.js +1 -2
  235. package/lib/isFalsy.js +3 -4
  236. package/lib/isFinite.js +5 -7
  237. package/lib/isFloat.js +4 -5
  238. package/lib/isFunction.js +4 -5
  239. package/lib/isGeneratorFunction.js +1 -2
  240. package/lib/isIndexed.js +4 -5
  241. package/lib/isInteger.js +5 -7
  242. package/lib/isInteger32.js +3 -4
  243. package/lib/isIterable.js +3 -4
  244. package/lib/isMap.js +1 -2
  245. package/lib/isNaN.js +5 -7
  246. package/lib/isNaturalNumber.js +4 -5
  247. package/lib/isNegative.js +3 -4
  248. package/lib/isNegativeZero.js +1 -2
  249. package/lib/isNilOrEmpty.js +1 -2
  250. package/lib/isNonEmptyArray.js +4 -6
  251. package/lib/isNonEmptyString.js +5 -7
  252. package/lib/isNonNegative.js +3 -4
  253. package/lib/isNonPositive.js +3 -4
  254. package/lib/isNotArray.js +3 -4
  255. package/lib/isNotArrayLike.js +3 -4
  256. package/lib/isNotAsyncFunction.js +3 -4
  257. package/lib/isNotBoolean.js +3 -4
  258. package/lib/isNotDate.js +3 -4
  259. package/lib/isNotFinite.js +3 -4
  260. package/lib/isNotFloat.js +3 -4
  261. package/lib/isNotFunction.js +3 -4
  262. package/lib/isNotGeneratorFunction.js +3 -4
  263. package/lib/isNotInteger.js +3 -4
  264. package/lib/isNotMap.js +3 -4
  265. package/lib/isNotNaN.js +3 -4
  266. package/lib/isNotNil.js +1 -2
  267. package/lib/isNotNilOrEmpty.js +3 -4
  268. package/lib/isNotNull.js +3 -4
  269. package/lib/isNotNumber.js +3 -4
  270. package/lib/isNotObj.js +3 -4
  271. package/lib/isNotObjLike.js +3 -4
  272. package/lib/isNotPair.js +3 -4
  273. package/lib/isNotPlainObj.js +3 -4
  274. package/lib/isNotPrimitive.js +3 -4
  275. package/lib/isNotRegExp.js +3 -4
  276. package/lib/isNotSet.js +3 -4
  277. package/lib/isNotString.js +3 -4
  278. package/lib/isNotUndefined.js +3 -4
  279. package/lib/isNotValidDate.js +3 -4
  280. package/lib/isNotValidNumber.js +3 -4
  281. package/lib/isNull.js +1 -2
  282. package/lib/isNumber.js +1 -2
  283. package/lib/isObj.js +5 -6
  284. package/lib/isObjLike.js +4 -5
  285. package/lib/isOdd.js +3 -4
  286. package/lib/isPair.js +3 -4
  287. package/lib/isPlainObj.js +5 -6
  288. package/lib/isPositive.js +3 -4
  289. package/lib/isPositiveZero.js +1 -2
  290. package/lib/isPrimitive.js +10 -11
  291. package/lib/isPromise.js +3 -4
  292. package/lib/isPrototypeOf.js +3 -4
  293. package/lib/isRegExp.js +1 -2
  294. package/lib/isSafeInteger.js +6 -7
  295. package/lib/isSentinelValue.js +5 -5
  296. package/lib/isSet.js +1 -2
  297. package/lib/isSparseArray.js +3 -4
  298. package/lib/isString.js +1 -2
  299. package/lib/isSymbol.js +2 -3
  300. package/lib/isThenable.js +3 -4
  301. package/lib/isTrue.js +1 -2
  302. package/lib/isTruthy.js +1 -2
  303. package/lib/isUinteger32.js +3 -4
  304. package/lib/isUndefined.js +3 -4
  305. package/lib/isValidDate.js +4 -5
  306. package/lib/isValidNumber.js +4 -5
  307. package/lib/lastP.js +12 -13
  308. package/lib/lengthEq.js +3 -4
  309. package/lib/lengthGt.js +3 -4
  310. package/lib/lengthGte.js +3 -4
  311. package/lib/lengthLt.js +3 -4
  312. package/lib/lengthLte.js +3 -4
  313. package/lib/lengthNotEq.js +3 -4
  314. package/lib/lensEq.js +1 -2
  315. package/lib/lensIso.js +1 -2
  316. package/lib/lensNotEq.js +3 -4
  317. package/lib/lensNotSatisfy.js +3 -4
  318. package/lib/lensSatisfies.js +3 -4
  319. package/lib/lensTraverse.js +3 -4
  320. package/lib/liftF.js +3 -4
  321. package/lib/liftFN.js +3 -4
  322. package/lib/list.js +1 -2
  323. package/lib/mapIndexed.js +1 -2
  324. package/lib/mergePath.js +1 -2
  325. package/lib/mergePaths.js +3 -4
  326. package/lib/mergeProp.js +3 -4
  327. package/lib/mergeProps.js +1 -2
  328. package/lib/move.js +1 -2
  329. package/lib/nand.js +1 -2
  330. package/lib/neither.js +1 -2
  331. package/lib/noneP.js +5 -6
  332. package/lib/nonePass.js +1 -2
  333. package/lib/noop.js +3 -4
  334. package/lib/nor.js +1 -2
  335. package/lib/notAllPass.js +1 -2
  336. package/lib/notAllUnique.js +3 -4
  337. package/lib/notBoth.js +1 -2
  338. package/lib/notEqual.js +1 -2
  339. package/lib/omitBy.js +1 -2
  340. package/lib/omitIndexes.js +1 -2
  341. package/lib/overlaps.js +2 -5
  342. package/lib/package.json +1 -0
  343. package/lib/padCharsEnd.js +6 -9
  344. package/lib/padCharsStart.js +6 -9
  345. package/lib/padEnd.js +3 -4
  346. package/lib/padStart.js +3 -4
  347. package/lib/pathNotEq.js +1 -2
  348. package/lib/pathOrLazy.js +1 -2
  349. package/lib/paths.js +1 -2
  350. package/lib/pickIndexes.js +1 -2
  351. package/lib/propNotEq.js +1 -2
  352. package/lib/rangeStep.js +3 -4
  353. package/lib/reduceIndexed.js +1 -2
  354. package/lib/reduceP.js +10 -11
  355. package/lib/reduceRightP.js +10 -11
  356. package/lib/rejectP.js +1 -2
  357. package/lib/renameKey.js +7 -8
  358. package/lib/renameKeyWith.js +3 -4
  359. package/lib/renameKeys.js +3 -4
  360. package/lib/renameKeysWith.js +1 -2
  361. package/lib/repeatStr.js +6 -9
  362. package/lib/replaceAll.js +6 -9
  363. package/lib/resolveP.js +1 -2
  364. package/lib/round.js +1 -2
  365. package/lib/seq.js +2 -2
  366. package/lib/sign.js +6 -7
  367. package/lib/skipTake.js +1 -2
  368. package/lib/sliceFrom.js +1 -2
  369. package/lib/sliceTo.js +1 -2
  370. package/lib/sortByPaths.js +1 -2
  371. package/lib/sortByProp.js +3 -4
  372. package/lib/sortByProps.js +6 -7
  373. package/lib/spreadPath.js +1 -2
  374. package/lib/spreadProp.js +3 -4
  375. package/lib/stubArray.js +1 -2
  376. package/lib/stubNull.js +1 -2
  377. package/lib/stubObj.js +1 -2
  378. package/lib/stubString.js +1 -2
  379. package/lib/stubUndefined.js +1 -2
  380. package/lib/subtractNum.js +1 -2
  381. package/lib/thenCatchP.js +2 -4
  382. package/lib/toArray.js +6 -8
  383. package/lib/toInteger32.js +3 -3
  384. package/lib/toNumber.js +3 -4
  385. package/lib/toUinteger32.js +4 -3
  386. package/lib/trimCharsEnd.js +3 -4
  387. package/lib/trimCharsStart.js +3 -4
  388. package/lib/trimEnd.js +7 -9
  389. package/lib/trimStart.js +7 -9
  390. package/lib/trunc.js +6 -7
  391. package/lib/unzipObjWith.js +3 -4
  392. package/lib/viewOr.js +1 -2
  393. package/lib/weave.js +1 -2
  394. package/lib/weaveLazy.js +1 -2
  395. package/lib/zipObjWith.js +1 -2
  396. package/package.json +59 -51
  397. package/dist/RA.node.min.js.LICENSE.txt +0 -22
  398. package/dist/RA.web.min.js.LICENSE.txt +0 -22
  399. package/dist/RA.web.standalone.min.js.LICENSE.txt +0 -22
  400. package/es/isNotEmpty.js +0 -25
  401. package/lib/isNotEmpty.js +0 -29
  402. package/src/Y.js +0 -32
  403. package/src/allEqual.js +0 -28
  404. package/src/allEqualTo.js +0 -25
  405. package/src/allIdentical.js +0 -26
  406. package/src/allIdenticalTo.js +0 -25
  407. package/src/allP.js +0 -27
  408. package/src/allSettledP.js +0 -34
  409. package/src/allUnique.js +0 -25
  410. package/src/anyP.js +0 -33
  411. package/src/appendFlipped.js +0 -24
  412. package/src/argsPass.js +0 -40
  413. package/src/async.js +0 -60
  414. package/src/cata.js +0 -86
  415. package/src/catchP.js +0 -25
  416. package/src/ceil.js +0 -28
  417. package/src/compact.js +0 -23
  418. package/src/concatAll.js +0 -35
  419. package/src/concatRight.js +0 -30
  420. package/src/copyKeys.js +0 -31
  421. package/src/curryRight.js +0 -26
  422. package/src/curryRightN.js +0 -29
  423. package/src/defaultWhen.js +0 -26
  424. package/src/delayP.js +0 -45
  425. package/src/dispatch.js +0 -74
  426. package/src/divideNum.js +0 -20
  427. package/src/dropArgs.js +0 -23
  428. package/src/ensureArray.js +0 -24
  429. package/src/escapeRegExp.js +0 -22
  430. package/src/fantasy-land/Identity.js +0 -270
  431. package/src/fantasy-land/mapping.js +0 -20
  432. package/src/fantasy-land/traits.js +0 -57
  433. package/src/fantasy-land/util.js +0 -23
  434. package/src/filterIndexed.js +0 -28
  435. package/src/findOr.js +0 -30
  436. package/src/flattenDepth.js +0 -39
  437. package/src/flattenPath.js +0 -28
  438. package/src/flattenProp.js +0 -28
  439. package/src/floor.js +0 -27
  440. package/src/fnull.js +0 -38
  441. package/src/inRange.js +0 -34
  442. package/src/included.js +0 -28
  443. package/src/index.js +0 -242
  444. package/src/internal/ap.js +0 -30
  445. package/src/internal/compareLength.js +0 -7
  446. package/src/internal/isCoercible.js +0 -12
  447. package/src/internal/isOfTypeObject.js +0 -3
  448. package/src/internal/makeFlat.js +0 -42
  449. package/src/internal/ponyfills/Array.from.js +0 -34
  450. package/src/internal/ponyfills/Math.sign.js +0 -3
  451. package/src/internal/ponyfills/Math.trunc.js +0 -14
  452. package/src/internal/ponyfills/Number.MAX_SAFE_INTEGER.js +0 -3
  453. package/src/internal/ponyfills/Number.MIN_SAFE_INTEGER.js +0 -3
  454. package/src/internal/ponyfills/Number.isFinite.js +0 -8
  455. package/src/internal/ponyfills/Number.isInteger.js +0 -10
  456. package/src/internal/ponyfills/Number.isNaN.js +0 -8
  457. package/src/internal/ponyfills/Number.isSafeInteger.js +0 -11
  458. package/src/internal/ponyfills/Promise.allSettled.js +0 -18
  459. package/src/internal/ponyfills/Promise.any.js +0 -29
  460. package/src/internal/ponyfills/String.padEnd.js +0 -25
  461. package/src/internal/ponyfills/String.padStart.js +0 -27
  462. package/src/internal/ponyfills/String.repeat.js +0 -49
  463. package/src/internal/ponyfills/String.replaceAll.js +0 -44
  464. package/src/internal/ponyfills/String.trimEnd.js +0 -5
  465. package/src/internal/ponyfills/String.trimStart.js +0 -5
  466. package/src/invoke.js +0 -22
  467. package/src/invokeArgs.js +0 -36
  468. package/src/isArray.js +0 -27
  469. package/src/isArrayLike.js +0 -79
  470. package/src/isAsyncFunction.js +0 -23
  471. package/src/isBigInt.js +0 -24
  472. package/src/isBlank.js +0 -33
  473. package/src/isBoolean.js +0 -22
  474. package/src/isDate.js +0 -21
  475. package/src/isEmptyArray.js +0 -28
  476. package/src/isEmptyString.js +0 -28
  477. package/src/isError.js +0 -21
  478. package/src/isEven.js +0 -31
  479. package/src/isFalse.js +0 -31
  480. package/src/isFalsy.js +0 -28
  481. package/src/isFinite.js +0 -37
  482. package/src/isFloat.js +0 -36
  483. package/src/isFunction.js +0 -32
  484. package/src/isGeneratorFunction.js +0 -26
  485. package/src/isIndexed.js +0 -24
  486. package/src/isInteger.js +0 -40
  487. package/src/isInteger32.js +0 -28
  488. package/src/isIterable.js +0 -37
  489. package/src/isMap.js +0 -25
  490. package/src/isNaN.js +0 -45
  491. package/src/isNaturalNumber.js +0 -28
  492. package/src/isNegative.js +0 -27
  493. package/src/isNegativeZero.js +0 -23
  494. package/src/isNilOrEmpty.js +0 -26
  495. package/src/isNonEmptyArray.js +0 -29
  496. package/src/isNonEmptyString.js +0 -32
  497. package/src/isNonNegative.js +0 -30
  498. package/src/isNonPositive.js +0 -30
  499. package/src/isNotArray.js +0 -24
  500. package/src/isNotArrayLike.js +0 -26
  501. package/src/isNotAsyncFunction.js +0 -27
  502. package/src/isNotBoolean.js +0 -24
  503. package/src/isNotDate.js +0 -23
  504. package/src/isNotEmpty.js +0 -26
  505. package/src/isNotFinite.js +0 -31
  506. package/src/isNotFloat.js +0 -35
  507. package/src/isNotFunction.js +0 -29
  508. package/src/isNotGeneratorFunction.js +0 -27
  509. package/src/isNotInteger.js +0 -36
  510. package/src/isNotMap.js +0 -27
  511. package/src/isNotNaN.js +0 -37
  512. package/src/isNotNil.js +0 -23
  513. package/src/isNotNilOrEmpty.js +0 -28
  514. package/src/isNotNull.js +0 -24
  515. package/src/isNotNumber.js +0 -25
  516. package/src/isNotObj.js +0 -29
  517. package/src/isNotObjLike.js +0 -29
  518. package/src/isNotPair.js +0 -27
  519. package/src/isNotPlainObj.js +0 -35
  520. package/src/isNotPrimitive.js +0 -26
  521. package/src/isNotRegExp.js +0 -24
  522. package/src/isNotSet.js +0 -26
  523. package/src/isNotString.js +0 -23
  524. package/src/isNotUndefined.js +0 -24
  525. package/src/isNotValidDate.js +0 -24
  526. package/src/isNotValidNumber.js +0 -27
  527. package/src/isNull.js +0 -22
  528. package/src/isNumber.js +0 -24
  529. package/src/isObj.js +0 -31
  530. package/src/isObjLike.js +0 -30
  531. package/src/isOdd.js +0 -29
  532. package/src/isPair.js +0 -27
  533. package/src/isPlainObj.js +0 -65
  534. package/src/isPositive.js +0 -26
  535. package/src/isPositiveZero.js +0 -23
  536. package/src/isPrimitive.js +0 -46
  537. package/src/isPromise.js +0 -32
  538. package/src/isPrototypeOf.js +0 -36
  539. package/src/isRegExp.js +0 -22
  540. package/src/isSafeInteger.js +0 -40
  541. package/src/isSentinelValue.js +0 -26
  542. package/src/isSet.js +0 -24
  543. package/src/isSparseArray.js +0 -43
  544. package/src/isString.js +0 -21
  545. package/src/isSymbol.js +0 -29
  546. package/src/isThenable.js +0 -28
  547. package/src/isTrue.js +0 -27
  548. package/src/isTruthy.js +0 -28
  549. package/src/isUinteger32.js +0 -29
  550. package/src/isUndefined.js +0 -24
  551. package/src/isValidDate.js +0 -29
  552. package/src/isValidNumber.js +0 -28
  553. package/src/lastP.js +0 -54
  554. package/src/lengthEq.js +0 -24
  555. package/src/lengthGt.js +0 -24
  556. package/src/lengthGte.js +0 -26
  557. package/src/lengthLt.js +0 -24
  558. package/src/lengthLte.js +0 -25
  559. package/src/lengthNotEq.js +0 -24
  560. package/src/lensEq.js +0 -28
  561. package/src/lensIso.js +0 -51
  562. package/src/lensNotEq.js +0 -28
  563. package/src/lensNotSatisfy.js +0 -30
  564. package/src/lensSatisfies.js +0 -33
  565. package/src/lensTraverse.js +0 -56
  566. package/src/liftF.js +0 -37
  567. package/src/liftFN.js +0 -45
  568. package/src/list.js +0 -20
  569. package/src/mapIndexed.js +0 -27
  570. package/src/mergePath.js +0 -30
  571. package/src/mergePaths.js +0 -29
  572. package/src/mergeProp.js +0 -30
  573. package/src/mergeProps.js +0 -27
  574. package/src/move.js +0 -26
  575. package/src/nand.js +0 -27
  576. package/src/neither.js +0 -38
  577. package/src/noneP.js +0 -35
  578. package/src/nonePass.js +0 -32
  579. package/src/noop.js +0 -21
  580. package/src/nor.js +0 -28
  581. package/src/notAllPass.js +0 -32
  582. package/src/notAllUnique.js +0 -25
  583. package/src/notBoth.js +0 -38
  584. package/src/notEqual.js +0 -31
  585. package/src/omitBy.js +0 -25
  586. package/src/omitIndexes.js +0 -27
  587. package/src/overlaps.js +0 -32
  588. package/src/padCharsEnd.js +0 -37
  589. package/src/padCharsStart.js +0 -35
  590. package/src/padEnd.js +0 -25
  591. package/src/padStart.js +0 -23
  592. package/src/pathNotEq.js +0 -31
  593. package/src/pathOrLazy.js +0 -30
  594. package/src/paths.js +0 -26
  595. package/src/pickIndexes.js +0 -30
  596. package/src/propNotEq.js +0 -30
  597. package/src/rangeStep.js +0 -37
  598. package/src/reduceIndexed.js +0 -31
  599. package/src/reduceP.js +0 -96
  600. package/src/reduceRightP.js +0 -101
  601. package/src/rejectP.js +0 -24
  602. package/src/renameKey.js +0 -33
  603. package/src/renameKeyWith.js +0 -30
  604. package/src/renameKeys.js +0 -40
  605. package/src/renameKeysWith.js +0 -27
  606. package/src/repeatStr.js +0 -30
  607. package/src/replaceAll.js +0 -35
  608. package/src/resolveP.js +0 -28
  609. package/src/round.js +0 -26
  610. package/src/seq.js +0 -38
  611. package/src/sign.js +0 -33
  612. package/src/skipTake.js +0 -33
  613. package/src/sliceFrom.js +0 -23
  614. package/src/sliceTo.js +0 -23
  615. package/src/sortByPaths.js +0 -55
  616. package/src/sortByProp.js +0 -45
  617. package/src/sortByProps.js +0 -31
  618. package/src/spreadPath.js +0 -26
  619. package/src/spreadProp.js +0 -25
  620. package/src/stubArray.js +0 -18
  621. package/src/stubNull.js +0 -19
  622. package/src/stubObj.js +0 -19
  623. package/src/stubString.js +0 -19
  624. package/src/stubUndefined.js +0 -19
  625. package/src/subtractNum.js +0 -20
  626. package/src/thenCatchP.js +0 -27
  627. package/src/toArray.js +0 -32
  628. package/src/toInteger32.js +0 -22
  629. package/src/toNumber.js +0 -24
  630. package/src/toUinteger32.js +0 -26
  631. package/src/trimCharsEnd.js +0 -25
  632. package/src/trimCharsStart.js +0 -25
  633. package/src/trimEnd.js +0 -30
  634. package/src/trimStart.js +0 -29
  635. package/src/trunc.js +0 -33
  636. package/src/unzipObjWith.js +0 -40
  637. package/src/viewOr.js +0 -32
  638. package/src/weave.js +0 -35
  639. package/src/weaveLazy.js +0 -37
  640. package/src/zipObjWith.js +0 -27
package/src/notEqual.js DELETED
@@ -1,31 +0,0 @@
1
- import { complement, equals } from 'ramda';
2
-
3
- /**
4
- * Returns `true` if its arguments are not equivalent, `false` otherwise. Handles
5
- * cyclical data structures.
6
- *
7
- * Dispatches symmetrically to the `equals` methods of both arguments, if
8
- * present.
9
- *
10
- * @func notEqual
11
- * @memberOf RA
12
- * @since {@link https://char0n.github.io/ramda-adjunct/2.29.0|v2.29.0}
13
- * @category Relation
14
- * @sig a -> b -> Boolean
15
- * @param {*} a
16
- * @param {*} b
17
- * @return {Boolean}
18
- * @see {@link https://ramdajs.com/docs/#equals|equals}
19
- * @example
20
- *
21
- * RA.notEqual(1, 1); //=> false
22
- * RA.notEqual(1, '1'); //=> true
23
- * RA.notEqual([1, 2, 3], [1, 2, 3]); //=> false
24
- *
25
- * const a = {}; a.v = a;
26
- * const b = {}; b.v = b;
27
- * RA.notEqual(a, b); //=> false
28
- */
29
- const notEqual = complement(equals);
30
-
31
- export default notEqual;
package/src/omitBy.js DELETED
@@ -1,25 +0,0 @@
1
- import { complement, identity, pickBy, useWith } from 'ramda';
2
-
3
- /* eslint-disable max-len */
4
- /**
5
- * Returns a partial copy of an object containing only the keys
6
- * that don't satisfy the supplied predicate.
7
- *
8
- * @func omitBy
9
- * @memberOf RA
10
- * @since {@link https://char0n.github.io/ramda-adjunct/2.6.0|v2.6.0}
11
- * @category Object
12
- * @sig ((v, k) -> Boolean) -> {k: v} -> {k: v}
13
- * @param {!Function} pred A predicate to determine whether or not a key should be included on the output object
14
- * @param {!Object} obj The object to copy from
15
- * @return {!Object} A new object only with properties that don't satisfy `pred`
16
- *
17
- * @example
18
- *
19
- * const isLowerCase = (val, key) => key.toLowerCase() === key;
20
- * RA.omitBy(isLowerCase, {a: 1, b: 2, A: 3, B: 4}); //=> {A: 3, B: 4}
21
- */
22
- /* eslint-enable max-len */
23
- const omitBy = useWith(pickBy, [complement, identity]);
24
-
25
- export default omitBy;
@@ -1,27 +0,0 @@
1
- import { includes, curry, addIndex, reject } from 'ramda';
2
-
3
- // helpers
4
- const rejectIndexed = addIndex(reject);
5
- const containsIndex = curry((indexes, val, index) => includes(index, indexes));
6
-
7
- /**
8
- * Returns a partial copy of an array omitting the indexes specified.
9
- *
10
- * @func omitIndexes
11
- * @memberOf RA
12
- * @since {@link https://char0n.github.io/ramda-adjunct/1.19.0|v1.19.0}
13
- * @category List
14
- * @sig [Int] -> [a] -> [a]
15
- * @see {@link http://ramdajs.com/docs/#omit|R.omit}, {@link RA.pickIndexes|pickIndexes}
16
- * @param {!Array} indexes The array of indexes to omit from the new array
17
- * @param {!Array} list The array to copy from
18
- * @return {!Array} The new array with omitted indexes
19
- * @example
20
- *
21
- * RA.omitIndexes([-1, 1, 3], ['a', 'b', 'c', 'd']); //=> ['a', 'c']
22
- */
23
- const omitIndexes = curry((indexes, list) =>
24
- rejectIndexed(containsIndex(indexes), list)
25
- );
26
-
27
- export default omitIndexes;
package/src/overlaps.js DELETED
@@ -1,32 +0,0 @@
1
- import { pipe, intersection, isEmpty, curryN } from 'ramda';
2
-
3
- import isNotEmpty from './isNotEmpty';
4
-
5
- /**
6
- * Returns true if two lists have at least one element common to both lists.
7
- *
8
- * @func overlaps
9
- * @memberOf RA
10
- * @category Relation
11
- * @since {@link https://char0n.github.io/ramda-adjunct/2.30.0|v2.30.0}
12
- * @sig [a] -> [a] -> Boolean
13
- * @param {Array} list1 The first list
14
- * @param {Array} list2 The second list
15
- * @return {boolean} True if two lists have at least one element common to both lists
16
- * @example
17
- *
18
- * RA.overlaps(['-v', '--verbose'], ['node', 'script.js', '-v']); //=> true
19
- * RA.overlaps(['-v', '--verbose'], []); //=> false
20
- * RA.overlaps([1, 2, 3], [3, 4, 5]); //=> true
21
- * RA.overlaps([1, 2, 3], [4, 5]); //=> false
22
- */
23
-
24
- const overlaps = curryN(2, (list1, list2) => {
25
- if (isEmpty(list1)) {
26
- return true;
27
- }
28
-
29
- return pipe(intersection, isNotEmpty)(list1, list2);
30
- });
31
-
32
- export default overlaps;
@@ -1,37 +0,0 @@
1
- import { curry, invoker, flip } from 'ramda';
2
-
3
- import ponyfill from './internal/ponyfills/String.padEnd';
4
- import isFunction from './isFunction';
5
-
6
- export const padEndPonyfill = curry(ponyfill);
7
-
8
- export const padEndInvoker = flip(invoker(2, 'padEnd'));
9
-
10
- /**
11
- * The function pads the current string with a given string
12
- * (repeated, if needed) so that the resulting string reaches a given length.
13
- * The padding is applied from the end of the current string.
14
- *
15
- * @func padCharsEnd
16
- * @memberOf RA
17
- * @since {@link https://char0n.github.io/ramda-adjunct/2.22.0|v2.22.0}
18
- * @category String
19
- * @sig String -> Number -> String -> String
20
- * @param {string} padString The string to pad the current string with
21
- * @param {number} targetLength The length of the resulting string once
22
- * the current string has been padded
23
- * @param {string} value String value to be padded
24
- * @return {string} A new string of the specified length with the pad string
25
- * applied at the end of the current string
26
- * @see {@link RA.padEnd|padEnd}, {@link RA.padCharsStart|padCharsStart}, {@link RA.padStart|padStart}
27
- * @example
28
- *
29
- * RA.padCharsEnd('-', 3, 'a'); // => 'a--'
30
- * RA.padCharsEnd('foo', 10, 'abc'); // => 'abcfoofoof'
31
- * RA.padCharsEnd('123456', 6, 'abc'); // => 'abc123'
32
- */
33
- const padCharsEnd = isFunction(String.prototype.padEnd)
34
- ? padEndInvoker
35
- : padEndPonyfill;
36
-
37
- export default padCharsEnd;
@@ -1,35 +0,0 @@
1
- import { flip, invoker, curry } from 'ramda';
2
-
3
- import isFunction from './isFunction';
4
- import ponyfill from './internal/ponyfills/String.padStart';
5
-
6
- export const padStartInvoker = flip(invoker(2, 'padStart'));
7
-
8
- export const padStartPonyfill = curry(ponyfill);
9
-
10
- /**
11
- * The function pads the current string with a given string
12
- * (repeated, if needed) so that the resulting string reaches a given length.
13
- * The padding is applied from the start of the current string.
14
- *
15
- * @func padCharsStart
16
- * @memberOf RA
17
- * @since {@link https://char0n.github.io/ramda-adjunct/2.22.0|v2.22.0}
18
- * @category String
19
- * @sig String -> Number -> String -> String
20
- * @param {string} padString The string to pad the current string with
21
- * @param {number} targetLength The length of the resulting string once the current string has been padded
22
- * @param {string} value String value to be padded
23
- * @return {string} A new string of the specified length with the pad string on the start of current string
24
- * @see {@link RA.padStart|padStart}, {@link RA.padEnd|padEnd}, {@link RA.padCharsEnd|padCharsEnd}
25
- * @example
26
- *
27
- * RA.padCharsStart('-', 3, 'a'); // => '--a'
28
- * RA.padCharsStart('foo', 10, 'abc'); // => 'foofoofabc'
29
- * RA.padCharsStart('123456', 6, 'abc'); // => '123abc'
30
- */
31
- const padCharsStart = isFunction(String.prototype.padStart)
32
- ? padStartInvoker
33
- : padStartPonyfill;
34
-
35
- export default padCharsStart;
package/src/padEnd.js DELETED
@@ -1,25 +0,0 @@
1
- import padCharsEnd from './padCharsEnd';
2
-
3
- /**
4
- * The function pads the current string with an empty string
5
- * so that the resulting string reaches a given length.
6
- * The padding is applied from the end of the current string.
7
- *
8
- * @func padEnd
9
- * @memberOf RA
10
- * @since {@link https://char0n.github.io/ramda-adjunct/2.22.0|v2.22.0}
11
- * @category String
12
- * @sig Number -> String -> String
13
- * @param {number} targetLength The length of the resulting string once
14
- * the current string has been padded
15
- * @param {string} value String value to be padded
16
- * @return {string} A new string of the specified length with the pad string
17
- * applied at the end of the current string
18
- * @see {@link RA.padCharsEnd|padCharsEnd}, {@link RA.padCharsStart|padCharsStart}, {@link RA.padStart|padStart}
19
- * @example
20
- *
21
- * RA.padEnd(3, 'a'); // => 'a '
22
- */
23
- const padEnd = padCharsEnd(' ');
24
-
25
- export default padEnd;
package/src/padStart.js DELETED
@@ -1,23 +0,0 @@
1
- import padCharsStart from './padCharsStart';
2
-
3
- /**
4
- * Pads string on the left side if it's shorter than length.
5
- *
6
- * @func padStart
7
- * @memberOf RA
8
- * @since {@link https://char0n.github.io/ramda-adjunct/2.25.0|v2.25.0}
9
- * @category String
10
- * @sig Number -> String -> String
11
- * @param {number} targetLength The length of the resulting string once
12
- * the current string has been padded
13
- * @param {string} value String value to be padded
14
- * @return {string} A new string of the specified length with the empty string
15
- * applied to the beginning of the current string
16
- * @see {@link RA.padCharsEnd|padCharsEnd}, {@link RA.padCharsStart|padCharsStart}, {@link RA.padEnd|padEnd}
17
- * @example
18
- *
19
- * RA.padStart(3, 'a'); // => ' a'
20
- */
21
- const padStart = padCharsStart(' ');
22
-
23
- export default padStart;
package/src/pathNotEq.js DELETED
@@ -1,31 +0,0 @@
1
- import { pathEq, complement } from 'ramda';
2
-
3
- /* eslint-disable max-len */
4
- /**
5
- * Determines whether a nested path on an object doesn't have a specific value,
6
- * in R.equals terms. Most likely used to filter a list.
7
- *
8
- * @func pathNotEq
9
- * @memberOf RA
10
- * @since {@link https://char0n.github.io/ramda-adjunct/2.4.0|v2.4.0}
11
- * @category Relation
12
- * @sig a => [Idx] => {a} => Boolean
13
- * @sig Idx = String | Int | Symbol
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
- * @param {Object} object The object to check the nested property in
17
- * @return {boolean} Returns Boolean `false` if the value equals the nested object property, `true` otherwise
18
- * @see {@link http://ramdajs.com/docs/#pathEq|R.pathEq}
19
- * @example
20
- *
21
- * const user1 = { address: { zipCode: 90210 } };
22
- * const user2 = { address: { zipCode: 55555 } };
23
- * const user3 = { name: 'Bob' };
24
- * const users = [ user1, user2, user3 ];
25
- * const isFamous = RA.pathNotEq(90210, ['address', 'zipCode']);
26
- * R.filter(isFamous, users); //=> [ user2, user3 ]
27
- */
28
- /* eslint-enable max-len */
29
- const pathNotEq = complement(pathEq);
30
-
31
- export default pathNotEq;
package/src/pathOrLazy.js DELETED
@@ -1,30 +0,0 @@
1
- import { curryN, identical, partial, pathOr, unary, when } from 'ramda';
2
-
3
- /**
4
- * If the given, non-null object has a value at the given path, returns the value at that path.
5
- * Otherwise returns the result of invoking the provided function with the object.
6
- *
7
- * @func pathOrLazy
8
- * @memberOf RA
9
- * @since {@link https://char0n.github.io/ramda-adjunct/2.22.0|v2.22.0}
10
- * @category Object
11
- * @typedef Idx = String | Int
12
- * @sig ({a} -> a) -> [Idx] -> {a} -> a
13
- * @param {Function} defaultFn The function that will return the default value.
14
- * @param {Array} path The path to use.
15
- * @param {Object} obj The object to retrieve the nested property from.
16
- * @return {*} The data at `path` of the supplied object or the default value.
17
- * @example
18
- *
19
- * RA.pathOrLazy(() => 'N/A', ['a', 'b'], {a: {b: 2}}); //=> 2
20
- * RA.pathOrLazy(() => 'N/A', ['a', 'b'], {c: {b: 2}}); //=> "N/A"
21
- */
22
- const pathOrLazy = curryN(3, (defaultFn, path, obj) =>
23
- when(
24
- identical(defaultFn),
25
- partial(unary(defaultFn), [obj]),
26
- pathOr(defaultFn, path, obj)
27
- )
28
- );
29
-
30
- export default pathOrLazy;
package/src/paths.js DELETED
@@ -1,26 +0,0 @@
1
- import { curry, ap, path, __ } from 'ramda';
2
-
3
- /**
4
- * Acts as multiple path: arrays of paths in, array of values out. Preserves order.
5
- *
6
- * @func paths
7
- * @memberOf RA
8
- * @since {@link https://char0n.github.io/ramda-adjunct/1.2.0|v1.2.0}
9
- * @category List
10
- * @sig [[k]] -> {k: v} - [v]
11
- * @param {Array} ps The property paths to fetch
12
- * @param {Object} obj The object to query
13
- * @return {Array} The corresponding values or partially applied function
14
- * @see {@link https://github.com/ramda/ramda/wiki/Cookbook#derivative-of-rprops-for-deep-fields|Ramda Cookbook}, {@link http://ramdajs.com/docs/#props|R.props}
15
- * @example
16
- *
17
- * const obj = {
18
- * a: { b: { c: 1 } },
19
- * x: 2,
20
- * };
21
- *
22
- * RA.paths([['a', 'b', 'c'], ['x']], obj); //=> [1, 2]
23
- */
24
- const paths = curry((ps, obj) => ap([path(__, obj)], ps));
25
-
26
- export default paths;
@@ -1,30 +0,0 @@
1
- import { filter, addIndex, curry, includes } from 'ramda';
2
-
3
- // helpers
4
- const filterIndexed = addIndex(filter);
5
- const containsIndex = curry((indexes, val, index) => includes(index, indexes));
6
-
7
- /**
8
- * Picks values from list by indexes.
9
- *
10
- * Note: pickIndexes will skip non existing indexes. If you want to include them
11
- * use ramda's `props` function.
12
- *
13
- * @func pickIndexes
14
- * @memberOf RA
15
- * @since {@link https://char0n.github.io/ramda-adjunct/1.1.0|v1.1.0}
16
- * @category List
17
- * @sig [Number] -> [a] -> [a]
18
- * @param {Array} indexes The indexes to pick
19
- * @param {Array} list The list to pick values from
20
- * @return {Array} New array containing only values at `indexes`
21
- * @see {@link http://ramdajs.com/docs/#pick|R.pick}, {@link RA.omitIndexes|omitIndexes}
22
- * @example
23
- *
24
- * RA.pickIndexes([0, 2], ['a', 'b', 'c']); //=> ['a', 'c']
25
- */
26
- const pickIndexes = curry((indexes, list) =>
27
- filterIndexed(containsIndex(indexes), list)
28
- );
29
-
30
- export default pickIndexes;
package/src/propNotEq.js DELETED
@@ -1,30 +0,0 @@
1
- import { propEq, complement } from 'ramda';
2
-
3
- /**
4
- * Returns true if the specified object property is not equal,
5
- * in R.equals terms, to the given value; false otherwise.
6
- *
7
- * @func propNotEq
8
- * @memberOf RA
9
- * @since {@link https://char0n.github.io/ramda-adjunct/2.3.0|v2.3.0}
10
- * @category Relation
11
- * @sig a -> String -> Object -> Boolean
12
- * @param {a} val The value to compare to
13
- * @param {String} name The property to pick
14
- * @param {Object} object The object, that presumably contains value under the property
15
- * @return {boolean} Comparison result
16
- * @see {@link http://ramdajs.com/docs/#propEq|R.propEq}
17
- * @example
18
- *
19
- * const abby = { name: 'Abby', age: 7, hair: 'blond' };
20
- * const fred = { name: 'Fred', age: 12, hair: 'brown' };
21
- * const rusty = { name: 'Rusty', age: 10, hair: 'brown' };
22
- * const alois = { name: 'Alois', age: 15, disposition: 'surly' };
23
- * const kids = [abby, fred, rusty, alois];
24
- * const hasNotBrownHair = RA.propNotEq('brown', 'hair');
25
- *
26
- * R.filter(hasNotBrownHair, kids); //=> [abby, alois]
27
- */
28
- const propNotEq = complement(propEq);
29
-
30
- export default propNotEq;
package/src/rangeStep.js DELETED
@@ -1,37 +0,0 @@
1
- import { curryN, map, range, always } from 'ramda';
2
-
3
- import floor from './floor';
4
-
5
- /**
6
- * Creates an array of numbers (positive and/or negative) progressing from start up to, but not including, end.
7
- *
8
- * `Note`: JavaScript follows the IEEE-754 standard for resolving floating-point values which can produce unexpected results.
9
- *
10
- * @func rangeStep
11
- * @memberOf RA
12
- * @category List
13
- * @since {@link https://char0n.github.io/ramda-adjunct/2.30.0|v2.30.0}
14
- * @sig Number -> Number -> Number -> [Number]
15
- * @param {number} step The value to increment or decrement by
16
- * @param {number} from The start of the range
17
- * @param {number} to The end of the range
18
- * @return {number[]} Returns the range of numbers
19
- * @see {@link http://ramdajs.com/docs/#range|R.range}
20
- * @example
21
- *
22
- * RA.rangeStep(1, 0, 4); // => [0, 1 ,2, 3]
23
- * RA.rangeStep(-1, 0, -4); // => [0, -1, -2, -3]
24
- * RA.rangeStep(1, 1, 5); // => [1, 2, 3, 4]
25
- * RA.rangeStep(5, 0, 20); // => [0, 5, 10, 15]
26
- * RA.rangeStep(-1, 0, -4); // => [0, -1, -2, -3]
27
- * RA.rangeStep(0, 1, 4); // => [1, 1, 1]
28
- * RA.rangeStep(1, 0, 0); // => []
29
- */
30
- const rangeStep = curryN(3, (step, from, to) => {
31
- const callback = step === 0 ? always(from) : (n) => from + step * n;
32
- const rangeEnd = step === 0 ? to - from : floor((to - from) / step);
33
-
34
- return map(callback, range(0, rangeEnd));
35
- });
36
-
37
- export default rangeStep;
@@ -1,31 +0,0 @@
1
- import { addIndex, reduce } from 'ramda';
2
-
3
- /**
4
- * {@link http://ramdajs.com/docs/#reduce|R.reduce} function that more closely resembles Array.prototype.reduce.
5
- * It takes two new parameters to its callback function: the current index, and the entire list.
6
- *
7
- * `reduceIndexed` implementation is simple : `
8
- * const reduceIndexed = R.addIndex(R.reduce);
9
- * `
10
- * @func reduceIndexed
11
- * @memberOf RA
12
- * @since {@link https://char0n.github.io/ramda-adjunct/2.5.0|v2.5.0}
13
- * @category List
14
- * @typedef Idx = Number
15
- * @sig ((a, b, Idx, [b]) => a) -> a -> [b] -> a
16
- * @param {Function} fn The iterator function. Receives four values,
17
- * the accumulator, the current element from the array, index and the entire list
18
- * @param {*} acc The accumulator value
19
- * @param {Array} list The list to iterate over
20
- * @return {*} The final, accumulated value
21
- * @see {@link http://ramdajs.com/docs/#addIndex|R.addIndex}, {@link http://ramdajs.com/docs/#reduce|R.reduce}
22
- * @example
23
- *
24
- * const initialList = ['f', 'o', 'o', 'b', 'a', 'r'];
25
- *
26
- * reduceIndexed((acc, val, idx, list) => acc + '-' + val + idx, '', initialList);
27
- * //=> "-f0-o1-o2-b3-a4-r5"
28
- */
29
- const reduceIndexed = addIndex(reduce);
30
-
31
- export default reduceIndexed;
package/src/reduceP.js DELETED
@@ -1,96 +0,0 @@
1
- import { curryN, reduce, length } from 'ramda';
2
-
3
- import isUndefined from './isUndefined';
4
- import resolveP from './resolveP';
5
- import allP from './allP';
6
-
7
- /* eslint-disable max-len */
8
- /**
9
- * Given an `Iterable`(arrays are `Iterable`), or a promise of an `Iterable`,
10
- * which produces promises (or a mix of promises and values),
11
- * iterate over all the values in the `Iterable` into an array and
12
- * reduce the array to a value using the given iterator function.
13
- *
14
- * If the iterator function returns a promise, then the result of the promise is awaited,
15
- * before continuing with next iteration. If any promise in the array is rejected or a promise
16
- * returned by the iterator function is rejected, the result is rejected as well.
17
- *
18
- * If `initialValue` is `undefined` (or a promise that resolves to `undefined`) and
19
- * the `Iterable` contains only 1 item, the callback will not be called and
20
- * the `Iterable's` single item is returned. If the `Iterable` is empty, the callback
21
- * will not be called and `initialValue` is returned (which may be undefined).
22
- *
23
- * This function is basically equivalent to {@link http://bluebirdjs.com/docs/api/promise.reduce.html|bluebird.reduce}.
24
- *
25
- * @func reduceP
26
- * @memberOf RA
27
- * @since {@link https://char0n.github.io/ramda-adjunct/1.13.0|v1.13.0}
28
- * @category List
29
- * @typedef MaybePromise = Promise.<*> | *
30
- * @sig ((Promise a, MaybePromise b) -> Promise a) -> MaybePromise a -> MaybePromise [MaybePromise b] -> Promise a
31
- * @param {Function} fn The iterator function. Receives two values, the accumulator and the current element from the list
32
- * @param {*|Promise.<*>} acc The accumulator value
33
- * @param {Array.<*>|Promise.<Array<*|Promise.<*>>>} list The list to iterate over
34
- * @return {Promise} The final, accumulated value
35
- * @see {@link http://ramdajs.com/docs/#reduce|R.reduce}, {@link RA.reduceRightP|reduceRightP}, {@link http://bluebirdjs.com/docs/api/promise.reduce.html|bluebird.reduce}
36
- * @example
37
- *
38
- * RA.reduceP(
39
- * (total, fileName) => fs
40
- * .readFileAsync(fileName, 'utf8')
41
- * .then(contents => total + parseInt(contents, 10)),
42
- * 0,
43
- * ['file1.txt', 'file2.txt', 'file3.txt']
44
- * ); // => Promise(10)
45
- *
46
- * RA.reduceP(
47
- * (total, fileName) => fs
48
- * .readFileAsync(fileName, 'utf8')
49
- * .then(contents => total + parseInt(contents, 10)),
50
- * Promise.resolve(0),
51
- * ['file1.txt', 'file2.txt', 'file3.txt']
52
- * ); // => Promise(10)
53
- *
54
- * RA.reduceP(
55
- * (total, fileName) => fs
56
- * .readFileAsync(fileName, 'utf8')
57
- * .then(contents => total + parseInt(contents, 10)),
58
- * 0,
59
- * [Promise.resolve('file1.txt'), 'file2.txt', 'file3.txt']
60
- * ); // => Promise(10)
61
- *
62
- * RA.reduceP(
63
- * (total, fileName) => fs
64
- * .readFileAsync(fileName, 'utf8')
65
- * .then(contents => total + parseInt(contents, 10)),
66
- * 0,
67
- * Promise.resolve([Promise.resolve('file1.txt'), 'file2.txt', 'file3.txt'])
68
- * ); // => Promise(10)
69
- *
70
- */
71
- /* esline-enable max-len */
72
- const reduceP = curryN(3, (fn, acc, list) =>
73
- resolveP(list).then((iterable) => {
74
- const listLength = length(iterable);
75
-
76
- if (listLength === 0) {
77
- return acc;
78
- }
79
-
80
- const reducer = reduce((accP, currentValueP) =>
81
- accP
82
- .then((previousValue) => allP([previousValue, currentValueP]))
83
- .then(([previousValue, currentValue]) => {
84
- if (isUndefined(previousValue) && listLength === 1) {
85
- return currentValue;
86
- }
87
-
88
- return fn(previousValue, currentValue);
89
- })
90
- );
91
-
92
- return reducer(resolveP(acc), iterable);
93
- })
94
- );
95
-
96
- export default reduceP;
@@ -1,101 +0,0 @@
1
- import { curryN, pipe, equals, reduceRight, length, concat } from 'ramda';
2
-
3
- import isUndefined from './isUndefined';
4
- import resolveP from './resolveP';
5
- import allP from './allP';
6
-
7
- // in older ramda versions the order of the arguments is flipped
8
- const flipArgs = pipe(reduceRight(concat, ''), equals('ba'))(['a', 'b']);
9
-
10
- /* eslint-disable max-len */
11
- /**
12
- * Given an `Iterable`(arrays are `Iterable`), or a promise of an `Iterable`,
13
- * which produces promises (or a mix of promises and values),
14
- * iterate over all the values in the `Iterable` into an array and
15
- * reduce the array to a value using the given iterator function.
16
- *
17
- * Similar to {@link RA.reduceP|reduceP} except moves through the input list from the right to the left.
18
- * The iterator function receives two values: (value, acc),
19
- * while the arguments' order of reduceP's iterator function is (acc, value).
20
- *
21
- * @func reduceRightP
22
- * @memberOf RA
23
- * @since {@link https://char0n.github.io/ramda-adjunct/1.13.0|v1.13.0}
24
- * @category List
25
- * @typedef MaybePromise = Promise.<*> | *
26
- * @sig ((MaybePromise b, Promise a) -> Promise a) -> MaybePromise a -> MaybePromise [MaybePromise b] -> Promise a
27
- * @param {Function} fn The iterator function. Receives two values, the current element from the list and the accumulator
28
- * @param {*|Promise.<*>} acc The accumulator value
29
- * @param {Array.<*>|Promise.<Array<*|Promise.<*>>>} list The list to iterate over
30
- * @return {Promise} The final, accumulated value
31
- * @see {@link RA.reduceP|reduceP}, {@link http://bluebirdjs.com/docs/api/promise.reduce.html|bluebird.reduce}
32
- * @example
33
- *
34
- * RA.reduceRightP(
35
- * (fileName, total) => fs
36
- * .readFileAsync(fileName, 'utf8')
37
- * .then(contents => total + parseInt(contents, 10)),
38
- * 0,
39
- * ['file1.txt', 'file2.txt', 'file3.txt']
40
- * ); // => Promise(10)
41
- *
42
- * RA.reduceRightP(
43
- * (fileName, total) => fs
44
- * .readFileAsync(fileName, 'utf8')
45
- * .then(contents => total + parseInt(contents, 10)),
46
- * Promise.resolve(0),
47
- * ['file1.txt', 'file2.txt', 'file3.txt']
48
- * ); // => Promise(10)
49
- *
50
- * RA.reduceRightP(
51
- * (fileName, total) => fs
52
- * .readFileAsync(fileName, 'utf8')
53
- * .then(contents => total + parseInt(contents, 10)),
54
- * 0,
55
- * [Promise.resolve('file1.txt'), 'file2.txt', 'file3.txt']
56
- * ); // => Promise(10)
57
- *
58
- * RA.reduceRightP(
59
- * (fileName, total) => fs
60
- * .readFileAsync(fileName, 'utf8')
61
- * .then(contents => total + parseInt(contents, 10)),
62
- * 0,
63
- * Promise.resolve([Promise.resolve('file1.txt'), 'file2.txt', 'file3.txt'])
64
- * ); // => Promise(10)
65
- *
66
- */
67
- /* esline-enable max-len */
68
- const reduceRightP = curryN(3, (fn, acc, list) =>
69
- resolveP(list).then((iterable) => {
70
- const listLength = length(iterable);
71
-
72
- if (listLength === 0) {
73
- return acc;
74
- }
75
-
76
- const reducer = reduceRight((arg1, arg2) => {
77
- let accP;
78
- let currentValueP;
79
-
80
- if (flipArgs) {
81
- [accP, currentValueP] = [arg1, arg2];
82
- } else {
83
- [accP, currentValueP] = [arg2, arg1];
84
- }
85
-
86
- return accP
87
- .then((previousValue) => allP([previousValue, currentValueP]))
88
- .then(([previousValue, currentValue]) => {
89
- if (isUndefined(previousValue) && listLength === 1) {
90
- return currentValue;
91
- }
92
-
93
- return fn(currentValue, previousValue);
94
- });
95
- });
96
-
97
- return reducer(resolveP(acc), iterable);
98
- })
99
- );
100
-
101
- export default reduceRightP;