ramda-adjunct 2.34.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 (719) hide show
  1. package/.nvmrc +1 -0
  2. package/CHANGELOG.md +973 -0
  3. package/LICENSE.md +25 -0
  4. package/README.md +297 -0
  5. package/SECURITY.md +43 -0
  6. package/dist/RA.node.js +11172 -0
  7. package/dist/RA.node.min.js +2 -0
  8. package/dist/RA.node.min.js.LICENSE.txt +22 -0
  9. package/dist/RA.web.js +11172 -0
  10. package/dist/RA.web.min.js +2 -0
  11. package/dist/RA.web.min.js.LICENSE.txt +22 -0
  12. package/dist/RA.web.standalone.js +27797 -0
  13. package/dist/RA.web.standalone.min.js +2 -0
  14. package/dist/RA.web.standalone.min.js.LICENSE.txt +22 -0
  15. package/es/Y.js +38 -0
  16. package/es/allEqual.js +25 -0
  17. package/es/allEqualTo.js +26 -0
  18. package/es/allIdentical.js +24 -0
  19. package/es/allIdenticalTo.js +26 -0
  20. package/es/allP.js +26 -0
  21. package/es/allSettledP.js +29 -0
  22. package/es/allUnique.js +23 -0
  23. package/es/anyP.js +28 -0
  24. package/es/appendFlipped.js +23 -0
  25. package/es/argsPass.js +38 -0
  26. package/es/async.js +57 -0
  27. package/es/cata.js +101 -0
  28. package/es/catchP.js +24 -0
  29. package/es/ceil.js +26 -0
  30. package/es/compact.js +21 -0
  31. package/es/concatAll.js +30 -0
  32. package/es/concatRight.js +29 -0
  33. package/es/contained.js +29 -0
  34. package/es/curryRight.js +24 -0
  35. package/es/curryRightN.js +32 -0
  36. package/es/defaultWhen.js +25 -0
  37. package/es/delayP.js +44 -0
  38. package/es/dispatch.js +75 -0
  39. package/es/divideNum.js +19 -0
  40. package/es/dropArgs.js +22 -0
  41. package/es/ensureArray.js +22 -0
  42. package/es/escapeRegExp.js +20 -0
  43. package/es/fantasy-land/Identity.js +309 -0
  44. package/es/fantasy-land/mapping.js +20 -0
  45. package/es/fantasy-land/traits.js +41 -0
  46. package/es/fantasy-land/util.js +11 -0
  47. package/es/filterIndexed.js +27 -0
  48. package/es/findOr.js +28 -0
  49. package/es/flattenDepth.js +50 -0
  50. package/es/flattenPath.js +27 -0
  51. package/es/flattenProp.js +28 -0
  52. package/es/floor.js +25 -0
  53. package/es/fnull.js +37 -0
  54. package/es/hasPath.js +38 -0
  55. package/es/inRange.js +29 -0
  56. package/es/index.js +252 -0
  57. package/es/internal/ap.js +20 -0
  58. package/es/internal/compareLength.js +5 -0
  59. package/es/internal/isOfTypeObject.js +7 -0
  60. package/es/internal/makeFlat.js +46 -0
  61. package/es/internal/ponyfills/Array.from.js +40 -0
  62. package/es/internal/ponyfills/Math.sign.js +5 -0
  63. package/es/internal/ponyfills/Math.trunc.js +14 -0
  64. package/es/internal/ponyfills/Number.MAX_SAFE_INTEGER.js +2 -0
  65. package/es/internal/ponyfills/Number.MIN_SAFE_INTEGER.js +2 -0
  66. package/es/internal/ponyfills/Number.isFinite.js +5 -0
  67. package/es/internal/ponyfills/Number.isInteger.js +4 -0
  68. package/es/internal/ponyfills/Number.isNaN.js +5 -0
  69. package/es/internal/ponyfills/Number.isSafeInteger.js +7 -0
  70. package/es/internal/ponyfills/Promise.allSettled.js +38 -0
  71. package/es/internal/ponyfills/Promise.any.js +77 -0
  72. package/es/internal/ponyfills/String.padEnd.js +24 -0
  73. package/es/internal/ponyfills/String.padStart.js +26 -0
  74. package/es/internal/ponyfills/String.repeat.js +46 -0
  75. package/es/internal/ponyfills/String.replaceAll.js +34 -0
  76. package/es/internal/ponyfills/String.trimEnd.js +3 -0
  77. package/es/internal/ponyfills/String.trimStart.js +3 -0
  78. package/es/invoke.js +20 -0
  79. package/es/invokeArgs.js +30 -0
  80. package/es/isArray.js +22 -0
  81. package/es/isArrayLike.js +87 -0
  82. package/es/isAsyncFunction.js +22 -0
  83. package/es/isBigInt.js +23 -0
  84. package/es/isBoolean.js +21 -0
  85. package/es/isDate.js +20 -0
  86. package/es/isEmptyArray.js +26 -0
  87. package/es/isEmptyString.js +27 -0
  88. package/es/isError.js +20 -0
  89. package/es/isEven.js +29 -0
  90. package/es/isFalse.js +29 -0
  91. package/es/isFalsy.js +26 -0
  92. package/es/isFinite.js +33 -0
  93. package/es/isFloat.js +34 -0
  94. package/es/isFunction.js +26 -0
  95. package/es/isGeneratorFunction.js +33 -0
  96. package/es/isIndexed.js +21 -0
  97. package/es/isInteger.js +35 -0
  98. package/es/isInteger32.js +28 -0
  99. package/es/isIterable.js +33 -0
  100. package/es/isMap.js +23 -0
  101. package/es/isNaN.js +41 -0
  102. package/es/isNaturalNumber.js +25 -0
  103. package/es/isNegative.js +25 -0
  104. package/es/isNegativeZero.js +22 -0
  105. package/es/isNilOrEmpty.js +25 -0
  106. package/es/isNonEmptyArray.js +27 -0
  107. package/es/isNonEmptyString.js +30 -0
  108. package/es/isNonNegative.js +28 -0
  109. package/es/isNonPositive.js +28 -0
  110. package/es/isNotArray.js +22 -0
  111. package/es/isNotArrayLike.js +24 -0
  112. package/es/isNotAsyncFunction.js +27 -0
  113. package/es/isNotBoolean.js +22 -0
  114. package/es/isNotDate.js +21 -0
  115. package/es/isNotEmpty.js +25 -0
  116. package/es/isNotFinite.js +29 -0
  117. package/es/isNotFloat.js +33 -0
  118. package/es/isNotFunction.js +29 -0
  119. package/es/isNotGeneratorFunction.js +27 -0
  120. package/es/isNotInteger.js +34 -0
  121. package/es/isNotMap.js +24 -0
  122. package/es/isNotNaN.js +35 -0
  123. package/es/isNotNil.js +22 -0
  124. package/es/isNotNilOrEmpty.js +26 -0
  125. package/es/isNotNull.js +22 -0
  126. package/es/isNotNumber.js +23 -0
  127. package/es/isNotObj.js +29 -0
  128. package/es/isNotObjLike.js +29 -0
  129. package/es/isNotPair.js +25 -0
  130. package/es/isNotPlainObj.js +35 -0
  131. package/es/isNotPrimitive.js +22 -0
  132. package/es/isNotRegExp.js +22 -0
  133. package/es/isNotSet.js +23 -0
  134. package/es/isNotString.js +21 -0
  135. package/es/isNotUndefined.js +22 -0
  136. package/es/isNotValidDate.js +22 -0
  137. package/es/isNotValidNumber.js +25 -0
  138. package/es/isNull.js +21 -0
  139. package/es/isNumber.js +23 -0
  140. package/es/isObj.js +31 -0
  141. package/es/isObjLike.js +30 -0
  142. package/es/isOdd.js +24 -0
  143. package/es/isPair.js +25 -0
  144. package/es/isPlainObj.js +52 -0
  145. package/es/isPositive.js +24 -0
  146. package/es/isPositiveZero.js +22 -0
  147. package/es/isPrimitive.js +31 -0
  148. package/es/isPromise.js +27 -0
  149. package/es/isPrototypeOf.js +34 -0
  150. package/es/isRegExp.js +21 -0
  151. package/es/isSafeInteger.js +34 -0
  152. package/es/isSentinelValue.js +26 -0
  153. package/es/isSet.js +22 -0
  154. package/es/isSparseArray.js +30 -0
  155. package/es/isString.js +20 -0
  156. package/es/isSymbol.js +27 -0
  157. package/es/isThenable.js +26 -0
  158. package/es/isTrue.js +25 -0
  159. package/es/isTruthy.js +27 -0
  160. package/es/isUndefined.js +22 -0
  161. package/es/isValidDate.js +26 -0
  162. package/es/isValidNumber.js +26 -0
  163. package/es/lastP.js +63 -0
  164. package/es/lengthEq.js +22 -0
  165. package/es/lengthGt.js +22 -0
  166. package/es/lengthGte.js +24 -0
  167. package/es/lengthLt.js +22 -0
  168. package/es/lengthLte.js +23 -0
  169. package/es/lengthNotEq.js +22 -0
  170. package/es/lensEq.js +27 -0
  171. package/es/lensIso.js +55 -0
  172. package/es/lensNotEq.js +26 -0
  173. package/es/lensNotSatisfy.js +28 -0
  174. package/es/lensSatisfies.js +31 -0
  175. package/es/lensTraverse.js +42 -0
  176. package/es/liftF.js +37 -0
  177. package/es/liftFN.js +47 -0
  178. package/es/list.js +19 -0
  179. package/es/mapIndexed.js +26 -0
  180. package/es/mergePath.js +30 -0
  181. package/es/mergePaths.js +27 -0
  182. package/es/mergeProp.js +30 -0
  183. package/es/mergeProps.js +26 -0
  184. package/es/mergeRight.js +26 -0
  185. package/es/move.js +25 -0
  186. package/es/nand.js +27 -0
  187. package/es/neither.js +39 -0
  188. package/es/noneP.js +28 -0
  189. package/es/nonePass.js +31 -0
  190. package/es/noop.js +19 -0
  191. package/es/nor.js +28 -0
  192. package/es/notAllPass.js +31 -0
  193. package/es/notAllUnique.js +23 -0
  194. package/es/notBoth.js +39 -0
  195. package/es/notEqual.js +30 -0
  196. package/es/omitBy.js +26 -0
  197. package/es/omitIndexes.js +27 -0
  198. package/es/overlaps.js +29 -0
  199. package/es/padCharsEnd.js +31 -0
  200. package/es/padCharsStart.js +29 -0
  201. package/es/padEnd.js +24 -0
  202. package/es/padStart.js +22 -0
  203. package/es/pathNotEq.js +32 -0
  204. package/es/pathOrLazy.js +25 -0
  205. package/es/paths.js +27 -0
  206. package/es/pickIndexes.js +30 -0
  207. package/es/propNotEq.js +29 -0
  208. package/es/rangeStep.js +36 -0
  209. package/es/reduceIndexed.js +30 -0
  210. package/es/reduceP.js +111 -0
  211. package/es/reduceRightP.js +117 -0
  212. package/es/rejectP.js +23 -0
  213. package/es/renameKeyWith.js +28 -0
  214. package/es/renameKeys.js +42 -0
  215. package/es/renameKeysWith.js +26 -0
  216. package/es/repeatStr.js +24 -0
  217. package/es/replaceAll.js +29 -0
  218. package/es/resolveP.js +29 -0
  219. package/es/round.js +24 -0
  220. package/es/seq.js +44 -0
  221. package/es/sign.js +27 -0
  222. package/es/skipTake.js +22 -0
  223. package/es/sliceFrom.js +22 -0
  224. package/es/sliceTo.js +22 -0
  225. package/es/sortByProps.js +52 -0
  226. package/es/spreadPath.js +25 -0
  227. package/es/spreadProp.js +25 -0
  228. package/es/stubArray.js +19 -0
  229. package/es/stubNull.js +18 -0
  230. package/es/stubObj.js +20 -0
  231. package/es/stubString.js +18 -0
  232. package/es/stubUndefined.js +19 -0
  233. package/es/subtractNum.js +19 -0
  234. package/es/thenCatchP.js +26 -0
  235. package/es/thenP.js +28 -0
  236. package/es/toArray.js +27 -0
  237. package/es/toInteger32.js +24 -0
  238. package/es/toUinteger32.js +26 -0
  239. package/es/trimCharsEnd.js +22 -0
  240. package/es/trimCharsStart.js +22 -0
  241. package/es/trimEnd.js +23 -0
  242. package/es/trimStart.js +22 -0
  243. package/es/trunc.js +27 -0
  244. package/es/unzipObjWith.js +26 -0
  245. package/es/viewOr.js +30 -0
  246. package/es/weave.js +36 -0
  247. package/es/weaveLazy.js +38 -0
  248. package/es/zipObjWith.js +26 -0
  249. package/lib/Y.js +44 -0
  250. package/lib/allEqual.js +35 -0
  251. package/lib/allEqualTo.js +32 -0
  252. package/lib/allIdentical.js +33 -0
  253. package/lib/allIdenticalTo.js +32 -0
  254. package/lib/allP.js +32 -0
  255. package/lib/allSettledP.js +41 -0
  256. package/lib/allUnique.js +32 -0
  257. package/lib/anyP.js +47 -0
  258. package/lib/appendFlipped.js +29 -0
  259. package/lib/argsPass.js +48 -0
  260. package/lib/async.js +67 -0
  261. package/lib/cata.js +110 -0
  262. package/lib/catchP.js +30 -0
  263. package/lib/ceil.js +32 -0
  264. package/lib/compact.js +30 -0
  265. package/lib/concatAll.js +40 -0
  266. package/lib/concatRight.js +35 -0
  267. package/lib/contained.js +35 -0
  268. package/lib/curryRight.js +33 -0
  269. package/lib/curryRightN.js +38 -0
  270. package/lib/defaultWhen.js +31 -0
  271. package/lib/delayP.js +54 -0
  272. package/lib/dispatch.js +50 -0
  273. package/lib/divideNum.js +25 -0
  274. package/lib/dropArgs.js +28 -0
  275. package/lib/ensureArray.js +31 -0
  276. package/lib/escapeRegExp.js +29 -0
  277. package/lib/fantasy-land/Identity.js +323 -0
  278. package/lib/fantasy-land/mapping.js +44 -0
  279. package/lib/fantasy-land/traits.js +77 -0
  280. package/lib/fantasy-land/util.js +21 -0
  281. package/lib/filterIndexed.js +33 -0
  282. package/lib/findOr.js +34 -0
  283. package/lib/flattenDepth.js +58 -0
  284. package/lib/flattenPath.js +33 -0
  285. package/lib/flattenProp.js +37 -0
  286. package/lib/floor.js +31 -0
  287. package/lib/fnull.js +47 -0
  288. package/lib/hasPath.js +47 -0
  289. package/lib/inRange.js +37 -0
  290. package/lib/index.js +863 -0
  291. package/lib/internal/ap.js +37 -0
  292. package/lib/internal/compareLength.js +12 -0
  293. package/lib/internal/isOfTypeObject.js +13 -0
  294. package/lib/internal/makeFlat.js +54 -0
  295. package/lib/internal/ponyfills/Array.from.js +52 -0
  296. package/lib/internal/ponyfills/Math.sign.js +11 -0
  297. package/lib/internal/ponyfills/Math.trunc.js +22 -0
  298. package/lib/internal/ponyfills/Number.MAX_SAFE_INTEGER.js +7 -0
  299. package/lib/internal/ponyfills/Number.MIN_SAFE_INTEGER.js +7 -0
  300. package/lib/internal/ponyfills/Number.isFinite.js +15 -0
  301. package/lib/internal/ponyfills/Number.isInteger.js +14 -0
  302. package/lib/internal/ponyfills/Number.isNaN.js +15 -0
  303. package/lib/internal/ponyfills/Number.isSafeInteger.js +18 -0
  304. package/lib/internal/ponyfills/Promise.allSettled.js +48 -0
  305. package/lib/internal/ponyfills/Promise.any.js +89 -0
  306. package/lib/internal/ponyfills/String.padEnd.js +34 -0
  307. package/lib/internal/ponyfills/String.padStart.js +36 -0
  308. package/lib/internal/ponyfills/String.repeat.js +55 -0
  309. package/lib/internal/ponyfills/String.replaceAll.js +44 -0
  310. package/lib/internal/ponyfills/String.trimEnd.js +10 -0
  311. package/lib/internal/ponyfills/String.trimStart.js +10 -0
  312. package/lib/invoke.js +29 -0
  313. package/lib/invokeArgs.js +40 -0
  314. package/lib/isArray.js +31 -0
  315. package/lib/isArrayLike.js +98 -0
  316. package/lib/isAsyncFunction.js +28 -0
  317. package/lib/isBigInt.js +29 -0
  318. package/lib/isBoolean.js +27 -0
  319. package/lib/isDate.js +26 -0
  320. package/lib/isEmptyArray.js +35 -0
  321. package/lib/isEmptyString.js +33 -0
  322. package/lib/isError.js +26 -0
  323. package/lib/isEven.js +39 -0
  324. package/lib/isFalse.js +35 -0
  325. package/lib/isFalsy.js +35 -0
  326. package/lib/isFinite.js +46 -0
  327. package/lib/isFloat.js +44 -0
  328. package/lib/isFunction.js +36 -0
  329. package/lib/isGeneratorFunction.js +40 -0
  330. package/lib/isIndexed.js +31 -0
  331. package/lib/isInteger.js +47 -0
  332. package/lib/isInteger32.js +37 -0
  333. package/lib/isIterable.js +42 -0
  334. package/lib/isMap.js +29 -0
  335. package/lib/isNaN.js +54 -0
  336. package/lib/isNaturalNumber.js +35 -0
  337. package/lib/isNegative.js +34 -0
  338. package/lib/isNegativeZero.js +28 -0
  339. package/lib/isNilOrEmpty.js +31 -0
  340. package/lib/isNonEmptyArray.js +37 -0
  341. package/lib/isNonEmptyString.js +41 -0
  342. package/lib/isNonNegative.js +37 -0
  343. package/lib/isNonPositive.js +37 -0
  344. package/lib/isNotArray.js +31 -0
  345. package/lib/isNotArrayLike.js +33 -0
  346. package/lib/isNotAsyncFunction.js +36 -0
  347. package/lib/isNotBoolean.js +31 -0
  348. package/lib/isNotDate.js +30 -0
  349. package/lib/isNotEmpty.js +31 -0
  350. package/lib/isNotFinite.js +38 -0
  351. package/lib/isNotFloat.js +42 -0
  352. package/lib/isNotFunction.js +38 -0
  353. package/lib/isNotGeneratorFunction.js +36 -0
  354. package/lib/isNotInteger.js +43 -0
  355. package/lib/isNotMap.js +33 -0
  356. package/lib/isNotNaN.js +44 -0
  357. package/lib/isNotNil.js +28 -0
  358. package/lib/isNotNilOrEmpty.js +35 -0
  359. package/lib/isNotNull.js +31 -0
  360. package/lib/isNotNumber.js +32 -0
  361. package/lib/isNotObj.js +38 -0
  362. package/lib/isNotObjLike.js +38 -0
  363. package/lib/isNotPair.js +34 -0
  364. package/lib/isNotPlainObj.js +44 -0
  365. package/lib/isNotPrimitive.js +31 -0
  366. package/lib/isNotRegExp.js +31 -0
  367. package/lib/isNotSet.js +32 -0
  368. package/lib/isNotString.js +30 -0
  369. package/lib/isNotUndefined.js +31 -0
  370. package/lib/isNotValidDate.js +31 -0
  371. package/lib/isNotValidNumber.js +34 -0
  372. package/lib/isNull.js +27 -0
  373. package/lib/isNumber.js +29 -0
  374. package/lib/isObj.js +42 -0
  375. package/lib/isObjLike.js +40 -0
  376. package/lib/isOdd.js +33 -0
  377. package/lib/isPair.js +34 -0
  378. package/lib/isPlainObj.js +64 -0
  379. package/lib/isPositive.js +33 -0
  380. package/lib/isPositiveZero.js +28 -0
  381. package/lib/isPrimitive.js +47 -0
  382. package/lib/isPromise.js +36 -0
  383. package/lib/isPrototypeOf.js +43 -0
  384. package/lib/isRegExp.js +27 -0
  385. package/lib/isSafeInteger.js +46 -0
  386. package/lib/isSentinelValue.js +35 -0
  387. package/lib/isSet.js +28 -0
  388. package/lib/isSparseArray.js +39 -0
  389. package/lib/isString.js +26 -0
  390. package/lib/isSymbol.js +33 -0
  391. package/lib/isThenable.js +35 -0
  392. package/lib/isTrue.js +31 -0
  393. package/lib/isTruthy.js +33 -0
  394. package/lib/isUndefined.js +31 -0
  395. package/lib/isValidDate.js +36 -0
  396. package/lib/isValidNumber.js +36 -0
  397. package/lib/lastP.js +76 -0
  398. package/lib/lengthEq.js +31 -0
  399. package/lib/lengthGt.js +31 -0
  400. package/lib/lengthGte.js +33 -0
  401. package/lib/lengthLt.js +31 -0
  402. package/lib/lengthLte.js +32 -0
  403. package/lib/lengthNotEq.js +31 -0
  404. package/lib/lensEq.js +33 -0
  405. package/lib/lensIso.js +62 -0
  406. package/lib/lensNotEq.js +35 -0
  407. package/lib/lensNotSatisfy.js +37 -0
  408. package/lib/lensSatisfies.js +40 -0
  409. package/lib/lensTraverse.js +51 -0
  410. package/lib/liftF.js +46 -0
  411. package/lib/liftFN.js +56 -0
  412. package/lib/list.js +25 -0
  413. package/lib/mapIndexed.js +32 -0
  414. package/lib/mergePath.js +39 -0
  415. package/lib/mergePaths.js +36 -0
  416. package/lib/mergeProp.js +39 -0
  417. package/lib/mergeProps.js +32 -0
  418. package/lib/mergeRight.js +32 -0
  419. package/lib/move.js +31 -0
  420. package/lib/nand.js +33 -0
  421. package/lib/neither.js +45 -0
  422. package/lib/noneP.js +39 -0
  423. package/lib/nonePass.js +37 -0
  424. package/lib/noop.js +28 -0
  425. package/lib/nor.js +34 -0
  426. package/lib/notAllPass.js +37 -0
  427. package/lib/notAllUnique.js +32 -0
  428. package/lib/notBoth.js +45 -0
  429. package/lib/notEqual.js +36 -0
  430. package/lib/omitBy.js +32 -0
  431. package/lib/omitIndexes.js +34 -0
  432. package/lib/overlaps.js +38 -0
  433. package/lib/padCharsEnd.js +44 -0
  434. package/lib/padCharsStart.js +42 -0
  435. package/lib/padEnd.js +32 -0
  436. package/lib/padStart.js +30 -0
  437. package/lib/pathNotEq.js +38 -0
  438. package/lib/pathOrLazy.js +31 -0
  439. package/lib/paths.js +33 -0
  440. package/lib/pickIndexes.js +37 -0
  441. package/lib/propNotEq.js +35 -0
  442. package/lib/rangeStep.js +45 -0
  443. package/lib/reduceIndexed.js +36 -0
  444. package/lib/reduceP.js +122 -0
  445. package/lib/reduceRightP.js +129 -0
  446. package/lib/rejectP.js +29 -0
  447. package/lib/renameKeyWith.js +37 -0
  448. package/lib/renameKeys.js +51 -0
  449. package/lib/renameKeysWith.js +32 -0
  450. package/lib/repeatStr.js +37 -0
  451. package/lib/replaceAll.js +42 -0
  452. package/lib/resolveP.js +35 -0
  453. package/lib/round.js +30 -0
  454. package/lib/seq.js +50 -0
  455. package/lib/sign.js +39 -0
  456. package/lib/skipTake.js +28 -0
  457. package/lib/sliceFrom.js +28 -0
  458. package/lib/sliceTo.js +28 -0
  459. package/lib/sortByProps.js +58 -0
  460. package/lib/spreadPath.js +31 -0
  461. package/lib/spreadProp.js +34 -0
  462. package/lib/stubArray.js +25 -0
  463. package/lib/stubNull.js +24 -0
  464. package/lib/stubObj.js +26 -0
  465. package/lib/stubString.js +24 -0
  466. package/lib/stubUndefined.js +25 -0
  467. package/lib/subtractNum.js +25 -0
  468. package/lib/thenCatchP.js +33 -0
  469. package/lib/thenP.js +34 -0
  470. package/lib/toArray.js +40 -0
  471. package/lib/toInteger32.js +30 -0
  472. package/lib/toUinteger32.js +32 -0
  473. package/lib/trimCharsEnd.js +31 -0
  474. package/lib/trimCharsStart.js +31 -0
  475. package/lib/trimEnd.js +36 -0
  476. package/lib/trimStart.js +35 -0
  477. package/lib/trunc.js +39 -0
  478. package/lib/unzipObjWith.js +35 -0
  479. package/lib/viewOr.js +36 -0
  480. package/lib/weave.js +42 -0
  481. package/lib/weaveLazy.js +44 -0
  482. package/lib/zipObjWith.js +32 -0
  483. package/package.json +204 -0
  484. package/src/Y.js +32 -0
  485. package/src/allEqual.js +28 -0
  486. package/src/allEqualTo.js +25 -0
  487. package/src/allIdentical.js +26 -0
  488. package/src/allIdenticalTo.js +25 -0
  489. package/src/allP.js +27 -0
  490. package/src/allSettledP.js +34 -0
  491. package/src/allUnique.js +25 -0
  492. package/src/anyP.js +33 -0
  493. package/src/appendFlipped.js +24 -0
  494. package/src/argsPass.js +40 -0
  495. package/src/async.js +60 -0
  496. package/src/cata.js +86 -0
  497. package/src/catchP.js +25 -0
  498. package/src/ceil.js +28 -0
  499. package/src/compact.js +23 -0
  500. package/src/concatAll.js +34 -0
  501. package/src/concatRight.js +30 -0
  502. package/src/contained.js +30 -0
  503. package/src/curryRight.js +26 -0
  504. package/src/curryRightN.js +29 -0
  505. package/src/defaultWhen.js +26 -0
  506. package/src/delayP.js +45 -0
  507. package/src/dispatch.js +74 -0
  508. package/src/divideNum.js +20 -0
  509. package/src/dropArgs.js +23 -0
  510. package/src/ensureArray.js +24 -0
  511. package/src/escapeRegExp.js +22 -0
  512. package/src/fantasy-land/Identity.js +270 -0
  513. package/src/fantasy-land/mapping.js +20 -0
  514. package/src/fantasy-land/traits.js +57 -0
  515. package/src/fantasy-land/util.js +23 -0
  516. package/src/filterIndexed.js +28 -0
  517. package/src/findOr.js +30 -0
  518. package/src/flattenDepth.js +39 -0
  519. package/src/flattenPath.js +26 -0
  520. package/src/flattenProp.js +28 -0
  521. package/src/floor.js +27 -0
  522. package/src/fnull.js +38 -0
  523. package/src/hasPath.js +40 -0
  524. package/src/inRange.js +34 -0
  525. package/src/index.js +241 -0
  526. package/src/internal/ap.js +30 -0
  527. package/src/internal/compareLength.js +7 -0
  528. package/src/internal/isOfTypeObject.js +3 -0
  529. package/src/internal/makeFlat.js +42 -0
  530. package/src/internal/ponyfills/Array.from.js +34 -0
  531. package/src/internal/ponyfills/Math.sign.js +3 -0
  532. package/src/internal/ponyfills/Math.trunc.js +14 -0
  533. package/src/internal/ponyfills/Number.MAX_SAFE_INTEGER.js +3 -0
  534. package/src/internal/ponyfills/Number.MIN_SAFE_INTEGER.js +3 -0
  535. package/src/internal/ponyfills/Number.isFinite.js +8 -0
  536. package/src/internal/ponyfills/Number.isInteger.js +10 -0
  537. package/src/internal/ponyfills/Number.isNaN.js +8 -0
  538. package/src/internal/ponyfills/Number.isSafeInteger.js +11 -0
  539. package/src/internal/ponyfills/Promise.allSettled.js +18 -0
  540. package/src/internal/ponyfills/Promise.any.js +29 -0
  541. package/src/internal/ponyfills/String.padEnd.js +25 -0
  542. package/src/internal/ponyfills/String.padStart.js +27 -0
  543. package/src/internal/ponyfills/String.repeat.js +49 -0
  544. package/src/internal/ponyfills/String.replaceAll.js +44 -0
  545. package/src/internal/ponyfills/String.trimEnd.js +5 -0
  546. package/src/internal/ponyfills/String.trimStart.js +5 -0
  547. package/src/invoke.js +22 -0
  548. package/src/invokeArgs.js +36 -0
  549. package/src/isArray.js +27 -0
  550. package/src/isArrayLike.js +79 -0
  551. package/src/isAsyncFunction.js +23 -0
  552. package/src/isBigInt.js +24 -0
  553. package/src/isBoolean.js +22 -0
  554. package/src/isDate.js +21 -0
  555. package/src/isEmptyArray.js +28 -0
  556. package/src/isEmptyString.js +28 -0
  557. package/src/isError.js +21 -0
  558. package/src/isEven.js +31 -0
  559. package/src/isFalse.js +31 -0
  560. package/src/isFalsy.js +28 -0
  561. package/src/isFinite.js +37 -0
  562. package/src/isFloat.js +36 -0
  563. package/src/isFunction.js +32 -0
  564. package/src/isGeneratorFunction.js +43 -0
  565. package/src/isIndexed.js +24 -0
  566. package/src/isInteger.js +40 -0
  567. package/src/isInteger32.js +28 -0
  568. package/src/isIterable.js +37 -0
  569. package/src/isMap.js +25 -0
  570. package/src/isNaN.js +45 -0
  571. package/src/isNaturalNumber.js +28 -0
  572. package/src/isNegative.js +27 -0
  573. package/src/isNegativeZero.js +23 -0
  574. package/src/isNilOrEmpty.js +26 -0
  575. package/src/isNonEmptyArray.js +29 -0
  576. package/src/isNonEmptyString.js +32 -0
  577. package/src/isNonNegative.js +30 -0
  578. package/src/isNonPositive.js +30 -0
  579. package/src/isNotArray.js +24 -0
  580. package/src/isNotArrayLike.js +26 -0
  581. package/src/isNotAsyncFunction.js +27 -0
  582. package/src/isNotBoolean.js +24 -0
  583. package/src/isNotDate.js +23 -0
  584. package/src/isNotEmpty.js +26 -0
  585. package/src/isNotFinite.js +31 -0
  586. package/src/isNotFloat.js +35 -0
  587. package/src/isNotFunction.js +29 -0
  588. package/src/isNotGeneratorFunction.js +27 -0
  589. package/src/isNotInteger.js +36 -0
  590. package/src/isNotMap.js +27 -0
  591. package/src/isNotNaN.js +37 -0
  592. package/src/isNotNil.js +23 -0
  593. package/src/isNotNilOrEmpty.js +28 -0
  594. package/src/isNotNull.js +24 -0
  595. package/src/isNotNumber.js +25 -0
  596. package/src/isNotObj.js +29 -0
  597. package/src/isNotObjLike.js +29 -0
  598. package/src/isNotPair.js +27 -0
  599. package/src/isNotPlainObj.js +35 -0
  600. package/src/isNotPrimitive.js +25 -0
  601. package/src/isNotRegExp.js +24 -0
  602. package/src/isNotSet.js +26 -0
  603. package/src/isNotString.js +23 -0
  604. package/src/isNotUndefined.js +24 -0
  605. package/src/isNotValidDate.js +24 -0
  606. package/src/isNotValidNumber.js +27 -0
  607. package/src/isNull.js +22 -0
  608. package/src/isNumber.js +24 -0
  609. package/src/isObj.js +31 -0
  610. package/src/isObjLike.js +30 -0
  611. package/src/isOdd.js +29 -0
  612. package/src/isPair.js +27 -0
  613. package/src/isPlainObj.js +65 -0
  614. package/src/isPositive.js +26 -0
  615. package/src/isPositiveZero.js +23 -0
  616. package/src/isPrimitive.js +45 -0
  617. package/src/isPromise.js +32 -0
  618. package/src/isPrototypeOf.js +36 -0
  619. package/src/isRegExp.js +22 -0
  620. package/src/isSafeInteger.js +40 -0
  621. package/src/isSentinelValue.js +26 -0
  622. package/src/isSet.js +24 -0
  623. package/src/isSparseArray.js +43 -0
  624. package/src/isString.js +21 -0
  625. package/src/isSymbol.js +29 -0
  626. package/src/isThenable.js +28 -0
  627. package/src/isTrue.js +27 -0
  628. package/src/isTruthy.js +28 -0
  629. package/src/isUndefined.js +24 -0
  630. package/src/isValidDate.js +29 -0
  631. package/src/isValidNumber.js +28 -0
  632. package/src/lastP.js +54 -0
  633. package/src/lengthEq.js +24 -0
  634. package/src/lengthGt.js +24 -0
  635. package/src/lengthGte.js +26 -0
  636. package/src/lengthLt.js +24 -0
  637. package/src/lengthLte.js +25 -0
  638. package/src/lengthNotEq.js +24 -0
  639. package/src/lensEq.js +28 -0
  640. package/src/lensIso.js +51 -0
  641. package/src/lensNotEq.js +28 -0
  642. package/src/lensNotSatisfy.js +30 -0
  643. package/src/lensSatisfies.js +33 -0
  644. package/src/lensTraverse.js +44 -0
  645. package/src/liftF.js +37 -0
  646. package/src/liftFN.js +45 -0
  647. package/src/list.js +20 -0
  648. package/src/mapIndexed.js +27 -0
  649. package/src/mergePath.js +32 -0
  650. package/src/mergePaths.js +29 -0
  651. package/src/mergeProp.js +30 -0
  652. package/src/mergeProps.js +27 -0
  653. package/src/mergeRight.js +27 -0
  654. package/src/move.js +26 -0
  655. package/src/nand.js +27 -0
  656. package/src/neither.js +38 -0
  657. package/src/noneP.js +35 -0
  658. package/src/nonePass.js +32 -0
  659. package/src/noop.js +21 -0
  660. package/src/nor.js +28 -0
  661. package/src/notAllPass.js +32 -0
  662. package/src/notAllUnique.js +25 -0
  663. package/src/notBoth.js +38 -0
  664. package/src/notEqual.js +31 -0
  665. package/src/omitBy.js +25 -0
  666. package/src/omitIndexes.js +27 -0
  667. package/src/overlaps.js +32 -0
  668. package/src/padCharsEnd.js +37 -0
  669. package/src/padCharsStart.js +35 -0
  670. package/src/padEnd.js +25 -0
  671. package/src/padStart.js +23 -0
  672. package/src/pathNotEq.js +31 -0
  673. package/src/pathOrLazy.js +30 -0
  674. package/src/paths.js +26 -0
  675. package/src/pickIndexes.js +30 -0
  676. package/src/propNotEq.js +30 -0
  677. package/src/rangeStep.js +37 -0
  678. package/src/reduceIndexed.js +31 -0
  679. package/src/reduceP.js +96 -0
  680. package/src/reduceRightP.js +101 -0
  681. package/src/rejectP.js +24 -0
  682. package/src/renameKeyWith.js +30 -0
  683. package/src/renameKeys.js +40 -0
  684. package/src/renameKeysWith.js +27 -0
  685. package/src/repeatStr.js +30 -0
  686. package/src/replaceAll.js +35 -0
  687. package/src/resolveP.js +28 -0
  688. package/src/round.js +26 -0
  689. package/src/seq.js +38 -0
  690. package/src/sign.js +33 -0
  691. package/src/skipTake.js +33 -0
  692. package/src/sliceFrom.js +23 -0
  693. package/src/sliceTo.js +23 -0
  694. package/src/sortByProps.js +31 -0
  695. package/src/spreadPath.js +26 -0
  696. package/src/spreadProp.js +25 -0
  697. package/src/stubArray.js +18 -0
  698. package/src/stubNull.js +19 -0
  699. package/src/stubObj.js +19 -0
  700. package/src/stubString.js +19 -0
  701. package/src/stubUndefined.js +19 -0
  702. package/src/subtractNum.js +20 -0
  703. package/src/thenCatchP.js +27 -0
  704. package/src/thenP.js +29 -0
  705. package/src/toArray.js +32 -0
  706. package/src/toInteger32.js +22 -0
  707. package/src/toUinteger32.js +26 -0
  708. package/src/trimCharsEnd.js +25 -0
  709. package/src/trimCharsStart.js +25 -0
  710. package/src/trimEnd.js +30 -0
  711. package/src/trimStart.js +29 -0
  712. package/src/trunc.js +33 -0
  713. package/src/unzipObjWith.js +40 -0
  714. package/src/viewOr.js +32 -0
  715. package/src/weave.js +35 -0
  716. package/src/weaveLazy.js +37 -0
  717. package/src/zipObjWith.js +27 -0
  718. package/tonicExample.js +4 -0
  719. package/types/index.d.ts +1553 -0
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports["default"] = void 0;
5
+
6
+ var _ramda = require("ramda");
7
+
8
+ var _compareLength = _interopRequireDefault(require("./internal/compareLength"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
+
12
+ /**
13
+ * Returns `true` if the supplied list or string has a length less than or equal to `valueLength`.
14
+ *
15
+ * @func lengthLte
16
+ * @memberOf RA
17
+ * @since {@link https://char0n.github.io/ramda-adjunct/2.8.0|v2.8.0}
18
+ * @category List
19
+ * @sig Number -> [*] -> Boolean
20
+ * @param {number} valueLength The length of the list or string
21
+ * @param {Array|string} value The list or string
22
+ * @return {boolean}
23
+ * @see {@link RA.lengthEq|lengthEq}, {@link RA.lengthNotEq|lengthNotEq}, {@link RA.lengthLt|lengthLt}, {@link RA.lengthGt|lengthGt}, {@link RA.lengthGte|lengthGte}, {@link http://ramdajs.com/docs/#lte|lte}, {@link http://ramdajs.com/docs/#length|length}
24
+ * @example
25
+ *
26
+ * RA.lengthLte(3, [1,2]); //=> true
27
+ * RA.lengthLte(3, [1,2,3]); //=> true
28
+ * RA.lengthLte(3, [1,2,3,4]); //=> false
29
+ */
30
+ var lengthLte = (0, _compareLength["default"])((0, _ramda.flip)(_ramda.lte));
31
+ var _default = lengthLte;
32
+ exports["default"] = _default;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports["default"] = void 0;
5
+
6
+ var _ramda = require("ramda");
7
+
8
+ var _compareLength = _interopRequireDefault(require("./internal/compareLength"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
+
12
+ /**
13
+ * Returns `true` if the supplied list or string has a length not equal to `valueLength`.
14
+ *
15
+ * @func lengthNotEq
16
+ * @memberOf RA
17
+ * @since {@link https://char0n.github.io/ramda-adjunct/2.8.0|v2.8.0}
18
+ * @category List
19
+ * @sig Number -> [*] -> Boolean
20
+ * @param {number} valueLength The length of the list or string
21
+ * @param {Array|string} value The list or string
22
+ * @return {boolean}
23
+ * @see {@link RA.lengthEq|lengthEq}, {@link RA.lengthLt|lengthLt}, {@link RA.lengthGt|lengthGt}, {@link RA.lengthLte|lengthLte}, {@link RA.lengthGte|lengthGte}, {@link http://ramdajs.com/docs/#equals|equals}, {@link http://ramdajs.com/docs/#length|length}
24
+ * @example
25
+ *
26
+ * RA.lengthNotEq(3, [1,2,3,4]); //=> true
27
+ * RA.lengthNotEq(3, [1,2,3]); //=> false
28
+ */
29
+ var lengthNotEq = (0, _compareLength["default"])((0, _ramda.complement)(_ramda.equals));
30
+ var _default = lengthNotEq;
31
+ exports["default"] = _default;
package/lib/lensEq.js ADDED
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports["default"] = void 0;
5
+
6
+ var _ramda = require("ramda");
7
+
8
+ /**
9
+ * Returns `true` if data structure focused by the given lens equals provided value.
10
+ *
11
+ * @func lensEq
12
+ * @memberOf RA
13
+ * @since {@link https://char0n.github.io/ramda-adjunct/1.13.0|1.13.0}
14
+ * @category Relation
15
+ * @typedef Lens s a = Functor f => (a -> f a) -> s -> f s
16
+ * @sig Lens s a -> b -> s -> Boolean
17
+ * @see {@link RA.lensNotEq|lensNotEq}
18
+ * @param {function} lens Van Laarhoven lens
19
+ * @param {*} value The value to compare the focused data structure with
20
+ * @param {*} data The data structure
21
+ * @return {boolean} `true` if the focused data structure equals value, `false` otherwise
22
+ *
23
+ * @example
24
+ *
25
+ * RA.lensEq(R.lensIndex(0), 1, [0, 1, 2]); // => false
26
+ * RA.lensEq(R.lensIndex(1), 1, [0, 1, 2]); // => true
27
+ * RA.lensEq(R.lensPath(['a', 'b']), 'foo', { a: { b: 'foo' } }) // => true
28
+ */
29
+ var lensEq = (0, _ramda.curryN)(3, function (lens, val, data) {
30
+ return (0, _ramda.pipe)((0, _ramda.view)(lens), (0, _ramda.equals)(val))(data);
31
+ });
32
+ var _default = lensEq;
33
+ exports["default"] = _default;
package/lib/lensIso.js ADDED
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports["default"] = void 0;
5
+
6
+ var _ramda = require("ramda");
7
+
8
+ // This implementation was highly inspired by the implementations
9
+ // in ramda-lens library.
10
+ //
11
+ // https://github.com/ramda/ramda-lens
12
+ // isomorphic :: ((a -> b), (b -> a)) -> Isomorphism
13
+ // Isomorphism = x -> y
14
+ var isomorphic = function isomorphic(to, from) {
15
+ var isomorphism = function isomorphism(x) {
16
+ return to(x);
17
+ };
18
+
19
+ isomorphism.from = from;
20
+ return isomorphism;
21
+ }; // isomorphisms :: ((a -> b), (b -> a)) -> (a -> b)
22
+
23
+
24
+ var isomorphisms = function isomorphisms(to, from) {
25
+ return isomorphic((0, _ramda.curry)(function (toFunctorFn, target) {
26
+ return (0, _ramda.map)(from, toFunctorFn(to(target)));
27
+ }), (0, _ramda.curry)(function (toFunctorFn, target) {
28
+ return (0, _ramda.map)(to, toFunctorFn(from(target)));
29
+ }));
30
+ }; // from :: Isomorphism -> a -> b
31
+
32
+
33
+ var from = (0, _ramda.curry)(function (isomorphism, x) {
34
+ return isomorphism.from(x);
35
+ });
36
+ /**
37
+ * Defines an isomorphism that will work like a lens. It takes two functions.
38
+ * The function that converts and the function that recovers.
39
+ *
40
+ * @func lensIso
41
+ * @memberOf RA
42
+ * @since {@link https://char0n.github.io/ramda-adjunct/1.19.0|1.19.0}
43
+ * @category Relation
44
+ * @typedef Lens s a = Functor f => (a -> f a) -> s -> f s
45
+ * @sig (s -> a) -> (a -> s) -> Lens s a
46
+ * @param {!function} to The function that converts
47
+ * @param {!function} from The function that recovers
48
+ * @return {!function} The isomorphic lens
49
+ * @see {@link http://ramdajs.com/docs/#lens|R.lens}
50
+ *
51
+ * @example
52
+ *
53
+ * const lensJSON = RA.lensIso(JSON.parse, JSON.stringify);
54
+ *
55
+ * R.over(lensJSON, assoc('b', 2), '{"a":1}'); //=> '{"a":1,"b":2}'
56
+ * R.over(RA.lensIso.from(lensJSON), R.replace('}', ',"b":2}'), { a: 1 }); // => { a: 1, b: 2 }
57
+ */
58
+
59
+ var lensIso = (0, _ramda.curry)(isomorphisms);
60
+ lensIso.from = from;
61
+ var _default = lensIso;
62
+ exports["default"] = _default;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports["default"] = void 0;
5
+
6
+ var _ramda = require("ramda");
7
+
8
+ var _lensEq = _interopRequireDefault(require("./lensEq"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
+
12
+ /**
13
+ * Returns `true` if data structure focused by the given lens doesn't equal provided value.
14
+ *
15
+ * @func lensNotEq
16
+ * @memberOf RA
17
+ * @since {@link https://char0n.github.io/ramda-adjunct/1.13.0|1.13.0}
18
+ * @category Relation
19
+ * @typedef Lens s a = Functor f => (a -> f a) -> s -> f s
20
+ * @sig Lens s a -> b -> s -> Boolean
21
+ * @see {@link RA.lensEq|lensEq}
22
+ * @param {function} lens Van Laarhoven lens
23
+ * @param {*} value The value to compare the focused data structure with
24
+ * @param {*} data The data structure
25
+ * @return {boolean} `false` if the focused data structure equals value, `true` otherwise
26
+ *
27
+ * @example
28
+ *
29
+ * RA.lensNotEq(R.lensIndex(0), 1, [0, 1, 2]); // => true
30
+ * RA.lensNotEq(R.lensIndex(1), 1, [0, 1, 2]); // => false
31
+ * RA.lensNotEq(R.lensPath(['a', 'b']), 'foo', { a: { b: 'foo' } }) // => false
32
+ */
33
+ var lensNotEq = (0, _ramda.complement)(_lensEq["default"]);
34
+ var _default = lensNotEq;
35
+ exports["default"] = _default;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports["default"] = void 0;
5
+
6
+ var _ramda = require("ramda");
7
+
8
+ var _lensSatisfies = _interopRequireDefault(require("./lensSatisfies"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
+
12
+ /**
13
+ * Returns `true` if data structure focused by the given lens doesn't satisfy the predicate.
14
+ * Note that the predicate is expected to return boolean value.
15
+ *
16
+ * @func lensNotSatisfy
17
+ * @memberOf RA
18
+ * @since {@link https://char0n.github.io/ramda-adjunct/1.13.0|1.13.0}
19
+ * @category Relation
20
+ * @typedef Lens s a = Functor f => (a -> f a) -> s -> f s
21
+ * @sig Boolean b => (a -> b) -> Lens s a -> s -> b
22
+ * @see {@link RA.lensSatisfies|lensSatisfies}
23
+ * @param {Function} predicate The predicate function
24
+ * @param {Function} lens Van Laarhoven lens
25
+ * @param {*} data The data structure
26
+ * @return {boolean} `false` if the focused data structure satisfies the predicate, `true` otherwise
27
+ *
28
+ * @example
29
+ *
30
+ * RA.lensNotSatisfy(RA.isTrue, R.lensIndex(0), [false, true, 1]); // => true
31
+ * RA.lensNotSatisfy(RA.isTrue, R.lensIndex(1), [false, true, 1]); // => false
32
+ * RA.lensNotSatisfy(RA.isTrue, R.lensIndex(2), [false, true, 1]); // => true
33
+ * RA.lensNotSatisfy(R.identity, R.lensProp('x'), { x: 1 }); // => true
34
+ */
35
+ var lensNotSatisfy = (0, _ramda.complement)(_lensSatisfies["default"]);
36
+ var _default = lensNotSatisfy;
37
+ exports["default"] = _default;
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports["default"] = void 0;
5
+
6
+ var _ramda = require("ramda");
7
+
8
+ var _isTrue = _interopRequireDefault(require("./isTrue"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
+
12
+ /**
13
+ * Returns `true` if data structure focused by the given lens satisfies the predicate.
14
+ * Note that the predicate is expected to return boolean value and will be evaluated
15
+ * as `false` unless the predicate returns `true`.
16
+ *
17
+ * @func lensSatisfies
18
+ * @memberOf RA
19
+ * @since {@link https://char0n.github.io/ramda-adjunct/1.13.0|1.13.0}
20
+ * @category Relation
21
+ * @typedef Lens s a = Functor f => (a -> f a) -> s -> f s
22
+ * @sig Boolean b => (a -> b) -> Lens s a -> s -> b
23
+ * @see {@link RA.lensNotSatisfy|lensNotSatisfy}
24
+ * @param {Function} predicate The predicate function
25
+ * @param {Function} lens Van Laarhoven lens
26
+ * @param {*} data The data structure
27
+ * @return {boolean} `true` if the focused data structure satisfies the predicate, `false` otherwise
28
+ *
29
+ * @example
30
+ *
31
+ * RA.lensSatisfies(RA.isTrue, R.lensIndex(0), [false, true, 1]); // => false
32
+ * RA.lensSatisfies(RA.isTrue, R.lensIndex(1), [false, true, 1]); // => true
33
+ * RA.lensSatisfies(RA.isTrue, R.lensIndex(2), [false, true, 1]); // => false
34
+ * RA.lensSatisfies(R.identity, R.lensProp('x'), { x: 1 }); // => false
35
+ */
36
+ var lensSatisfies = (0, _ramda.curryN)(3, function (predicate, lens, data) {
37
+ return (0, _ramda.pipe)((0, _ramda.view)(lens), predicate, _isTrue["default"])(data);
38
+ });
39
+ var _default = lensSatisfies;
40
+ exports["default"] = _default;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports["default"] = void 0;
5
+
6
+ var _ramda = require("ramda");
7
+
8
+ var _Identity = _interopRequireDefault(require("./fantasy-land/Identity"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
+
12
+ /**
13
+ * Creates a [Traversable](https://github.com/fantasyland/fantasy-land#traversable) lens
14
+ * from an [Applicative](https://github.com/fantasyland/fantasy-land#applicative)-returning function.
15
+ *
16
+ * When executed, it maps an [Applicative](https://github.com/fantasyland/fantasy-land#applicative)-returning
17
+ * function over a [Traversable](https://github.com/fantasyland/fantasy-land#traversable),
18
+ * then uses [`sequence`](https://ramdajs.com/docs/#sequence) to transform the resulting Traversable of Applicative
19
+ * into an Applicative of Traversable.
20
+ *
21
+ * Dispatches to the `traverse` method of the third argument, if present.
22
+ *
23
+ * @func lensTraverse
24
+ * @memberOf RA
25
+ * @since {@link https://char0n.github.io/ramda-adjunct/2.7.0|2.7.0}
26
+ * @category Relation
27
+ * @typedef Lens s a = Functor f => (a -> f a) -> s -> f s
28
+ * @sig Applicative f => (a -> f a) -> Lens s a
29
+ * @param {!function} of The Applicative-returning function
30
+ * @return {!function} The Traversable lens
31
+ * @see {@link http://ramdajs.com/docs/#lens|R.lens}, {@link http://ramdajs.com/docs/#traverse|R.traverse}
32
+ *
33
+ * @example
34
+ *
35
+ * const maybeLens = RA.lensTraverse(Maybe.of);
36
+ * const safeDiv = n => d => d === 0 ? Maybe.Nothing() : Maybe.Just(n / d)
37
+ *
38
+ * R.over(maybeLens, safeDiv(10), [2, 4, 5]); // => Just([5, 2.5, 2])
39
+ * R.over(maybeLens, safeDiv(10), [2, 0, 5]); // => Nothing
40
+ *
41
+ * R.view(maybeLens, [Maybe.Just(2), Maybe.Just(3)]); // => Maybe.Just([2, 3])
42
+ *
43
+ * R.set(maybeLens, Maybe.Just(1), [Maybe.just(2), Maybe.Just(3)]); // => Maybe.Just([1, 1])
44
+ */
45
+ var lensTraverse = (0, _ramda.curryN)(1, function (of) {
46
+ return (0, _ramda.curry)(function (toFunctorFn, target) {
47
+ return _Identity["default"].of((0, _ramda.traverse)(of, (0, _ramda.pipe)(toFunctorFn, (0, _ramda.prop)('value')), target));
48
+ });
49
+ });
50
+ var _default = lensTraverse;
51
+ exports["default"] = _default;
package/lib/liftF.js ADDED
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports["default"] = void 0;
5
+
6
+ var _ramda = require("ramda");
7
+
8
+ var _liftFN = _interopRequireDefault(require("./liftFN"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
+
12
+ /**
13
+ * "lifts" a function to be the specified arity, so that it may "map over" objects that satisfy
14
+ * the fantasy land Apply spec of algebraic structures.
15
+ *
16
+ * Lifting is specific for {@link https://github.com/scalaz/scalaz|scalaz} and {@link http://functionaljava.org/|function Java} implementations.
17
+ * Old version of fantasy land spec were not compatible with this approach,
18
+ * but as of fantasy land 1.0.0 Apply spec also adopted this approach.
19
+ *
20
+ * This function acts as interop for ramda <= 0.23.0 and {@link https://monet.github.io/monet.js/|monet.js}.
21
+ *
22
+ * More info {@link https://github.com/fantasyland/fantasy-land/issues/50|here}.
23
+ *
24
+ * @func liftF
25
+ * @memberOf RA
26
+ * @since {@link https://char0n.github.io/ramda-adjunct/1.2.0|v1.2.0}
27
+ * @category Function
28
+ * @sig Apply a => (a... -> a) -> (a... -> a)
29
+ * @param {Function} fn The function to lift into higher context
30
+ * @return {Function} The lifted function
31
+ * @see {@link RA.liftFN|liftFN}
32
+ * @example
33
+ *
34
+ * const { Maybe } = require('monet');
35
+ *
36
+ * const add3 = (a, b, c) => a + b + c;
37
+ * const madd3 = RA.liftF(add3);
38
+ *
39
+ * madd3(Maybe.Some(10), Maybe.Some(15), Maybe.Some(17)); //=> Maybe.Some(42)
40
+ * madd3(Maybe.Some(10), Maybe.Nothing(), Maybe.Some(17)); //=> Maybe.Nothing()
41
+ */
42
+ var liftF = (0, _ramda.curryN)(1, function (fn) {
43
+ return (0, _liftFN["default"])(fn.length, fn);
44
+ });
45
+ var _default = liftF;
46
+ exports["default"] = _default;
package/lib/liftFN.js ADDED
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports["default"] = void 0;
5
+
6
+ var _ramda = require("ramda");
7
+
8
+ var _ap = _interopRequireDefault(require("./internal/ap"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
+
12
+ /**
13
+ * "lifts" a function to be the specified arity, so that it may "map over" objects that satisfy
14
+ * the fantasy land Apply spec of algebraic structures.
15
+ *
16
+ * Lifting is specific for {@link https://github.com/scalaz/scalaz|scalaz} and {@link http://www.functionaljava.org/|functional java} implementations.
17
+ * Old version of fantasy land spec were not compatible with this approach,
18
+ * but as of fantasy land 1.0.0 Apply spec also adopted this approach.
19
+ *
20
+ * This function acts as interop for ramda <= 0.23.0 and {@link https://monet.github.io/monet.js/|monet.js}.
21
+ *
22
+ * More info {@link https://github.com/fantasyland/fantasy-land/issues/50|here}.
23
+ *
24
+ * @func liftFN
25
+ * @memberOf RA
26
+ * @since {@link https://char0n.github.io/ramda-adjunct/1.2.0|v1.2.0}
27
+ * @category Function
28
+ * @sig Apply a => Number -> (a... -> a) -> (a... -> a)
29
+ * @param {number} arity The arity of the lifter function
30
+ * @param {Function} fn The function to lift into higher context
31
+ * @return {Function} The lifted function
32
+ * @see {@link http://ramdajs.com/docs/#lift|R.lift}, {@link http://ramdajs.com/docs/#ap|R.ap}
33
+ * @example
34
+ *
35
+ * const { Maybe } = require('monet');
36
+ *
37
+ * const add3 = (a, b, c) => a + b + c;
38
+ * const madd3 = RA.liftFN(3, add3);
39
+ *
40
+ * madd3(Maybe.Some(10), Maybe.Some(15), Maybe.Some(17)); //=> Maybe.Some(42)
41
+ * madd3(Maybe.Some(10), Maybe.Nothing(), Maybe.Some(17)); //=> Maybe.Nothing()
42
+ */
43
+ var liftFN = (0, _ramda.curry)(function (arity, fn) {
44
+ var lifted = (0, _ramda.curryN)(arity, fn);
45
+ return (0, _ramda.curryN)(arity, function () {
46
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
47
+ args[_key] = arguments[_key];
48
+ }
49
+
50
+ var accumulator = (0, _ramda.map)(lifted, (0, _ramda.head)(args));
51
+ var apps = (0, _ramda.slice)(1, Infinity, args);
52
+ return (0, _ramda.reduce)(_ap["default"], accumulator, apps);
53
+ });
54
+ });
55
+ var _default = liftFN;
56
+ exports["default"] = _default;
package/lib/list.js ADDED
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports["default"] = void 0;
5
+
6
+ var _ramda = require("ramda");
7
+
8
+ /**
9
+ * Creates a list from arguments.
10
+ *
11
+ * @func list
12
+ * @memberOf RA
13
+ * @since {@link https://char0n.github.io/ramda-adjunct/1.1.0|v1.1.0}
14
+ * @category List
15
+ * @sig a... -> [a...]
16
+ * @param {...*} items The items of the feature list
17
+ * @return {Array} New list created from items
18
+ * @see {@link https://github.com/ramda/ramda/wiki/Cookbook#create-a-list-function|Ramda Cookbook}
19
+ * @example
20
+ *
21
+ * RA.list('a', 'b', 'c'); //=> ['a', 'b', 'c']
22
+ */
23
+ var list = (0, _ramda.unapply)(_ramda.identity);
24
+ var _default = list;
25
+ exports["default"] = _default;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports["default"] = void 0;
5
+
6
+ var _ramda = require("ramda");
7
+
8
+ /**
9
+ * {@link http://ramdajs.com/docs/#map|R.map} function that more closely resembles Array.prototype.map.
10
+ * It takes two new parameters to its callback function: the current index, and the entire list.
11
+ *
12
+ * `mapIndexed` implementation is simple : `
13
+ * const mapIndexed = R.addIndex(R.map);
14
+ * `
15
+ * @func mapIndexed
16
+ * @memberOf RA
17
+ * @since {@link https://char0n.github.io/ramda-adjunct/2.5.0|v2.5.0}
18
+ * @category List
19
+ * @typedef Idx = Number
20
+ * @sig Functor f => ((a, Idx, f a) => b) => f a -> f b
21
+ * @param {Function} fn The function to be called on every element of the input `list`
22
+ * @param {Array} list The list to be iterated over
23
+ * @return {Array} The new list
24
+ * @see {@link http://ramdajs.com/docs/#addIndex|R.addIndex}, {@link http://ramdajs.com/docs/#map|R.map}
25
+ * @example
26
+ *
27
+ * RA.mapIndexed((val, idx, list) => idx + '-' + val, ['f', 'o', 'o', 'b', 'a', 'r']);
28
+ * //=> ['0-f', '1-o', '2-o', '3-b', '4-a', '5-r']
29
+ */
30
+ var mapIndexed = (0, _ramda.addIndex)(_ramda.map);
31
+ var _default = mapIndexed;
32
+ exports["default"] = _default;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports["default"] = void 0;
5
+
6
+ var _ramda = require("ramda");
7
+
8
+ var _mergeRight = _interopRequireDefault(require("./mergeRight"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
+
12
+ /**
13
+ * Create a new object with the own properties of the object under the `path`
14
+ * merged with the own properties of the provided `source`.
15
+ * If a key exists in both objects, the value from the `source` object will be used.
16
+ *
17
+ * @func mergePath
18
+ * @memberOf RA
19
+ * @since {@link https://char0n.github.io/ramda-adjunct/1.18.0|v1.18.0}
20
+ * @category Object
21
+ * @sig [k] -> {a} -> {k: {a}} -> {k: {a}}
22
+ * @see {@link RA.mergeProp|mergeProp}
23
+ * @param {!Array} path The property path of the destination object
24
+ * @param {!Object} source The source object
25
+ * @param {!Object} obj The object that has destination object under corresponding property path
26
+ * @return {!Object} The new version of object
27
+ * @example
28
+ *
29
+ * RA.mergePath(
30
+ * ['outer', 'inner'],
31
+ * { foo: 3, bar: 4 },
32
+ * { outer: { inner: { foo: 2 } } }
33
+ * ); //=> { outer: { inner: { foo: 3, bar: 4 } }
34
+ */
35
+ var mergePath = (0, _ramda.curry)(function (path, source, obj) {
36
+ return (0, _ramda.over)((0, _ramda.lensPath)(path), (0, _mergeRight["default"])(source), obj);
37
+ });
38
+ var _default = mergePath;
39
+ exports["default"] = _default;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports["default"] = void 0;
5
+
6
+ var _ramda = require("ramda");
7
+
8
+ var _paths = _interopRequireDefault(require("./paths"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
+
12
+ /**
13
+ * Merge objects under corresponding paths.
14
+ *
15
+ * @func mergePaths
16
+ * @memberOf RA
17
+ * @since {@link https://char0n.github.io/ramda-adjunct/1.17.0|v1.17.0}
18
+ * @category Object
19
+ * @sig [[k]] -> {k: {a}} -> {a}
20
+ * @see {@link RA.mergeProps|mergeProps}
21
+ * @param {!Array} paths The property paths to merge
22
+ * @param {!Object} obj The object to query
23
+ * @return {!Object} The object composed of merged property paths of obj
24
+ * @example
25
+ *
26
+ * const obj = {
27
+ * foo: { fooInner: { fooInner2: 1 } },
28
+ * bar: { barInner: 2 }
29
+ * };
30
+ *
31
+ * { ...obj.foo.fooInner, ...obj.bar }; //=> { fooInner2: 1, barInner: 2 }
32
+ * RA.mergePaths([['foo', 'fooInner'], ['bar']], obj); //=> { fooInner2: 1, barInner: 2 }
33
+ */
34
+ var mergePaths = (0, _ramda.curryN)(2, (0, _ramda.pipe)(_paths["default"], _ramda.mergeAll));
35
+ var _default = mergePaths;
36
+ exports["default"] = _default;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports["default"] = void 0;
5
+
6
+ var _ramda = require("ramda");
7
+
8
+ var _mergePath = _interopRequireDefault(require("./mergePath"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
+
12
+ /**
13
+ * Create a new object with the own properties of the object under the `p`
14
+ * merged with the own properties of the provided `source`.
15
+ * If a key exists in both objects, the value from the `source` object will be used.
16
+ *
17
+ * @func mergeProp
18
+ * @memberOf RA
19
+ * @since {@link https://char0n.github.io/ramda-adjunct/1.18.0|v1.18.0}
20
+ * @category Object
21
+ * @sig [k] -> {a} -> {k: {a}} -> {k: {a}}
22
+ * @see {@link RA.mergePath|mergePath}
23
+ * @param {!Array} p The property of the destination object
24
+ * @param {!Object} source The source object
25
+ * @param {!Object} obj The object that has destination object under corresponding property
26
+ * @return {!Object} The new version of object
27
+ * @example
28
+ *
29
+ * RA.mergeProp(
30
+ * 'outer',
31
+ * { foo: 3, bar: 4 },
32
+ * { outer: { foo: 2 } }
33
+ * ); //=> { outer: { foo: 3, bar: 4 } };
34
+ */
35
+ var mergeProp = (0, _ramda.curry)(function (p, subj, obj) {
36
+ return (0, _mergePath["default"])((0, _ramda.of)(p), subj, obj);
37
+ });
38
+ var _default = mergeProp;
39
+ exports["default"] = _default;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports["default"] = void 0;
5
+
6
+ var _ramda = require("ramda");
7
+
8
+ /**
9
+ * Functional equivalent of merging object properties with object spread operator.
10
+ *
11
+ * @func mergeProps
12
+ * @memberOf RA
13
+ * @since {@link https://char0n.github.io/ramda-adjunct/1.17.0|v1.17.0}
14
+ * @category Object
15
+ * @sig [k] -> {k: {a}} -> {a}
16
+ * @see {@link RA.mergePaths|mergePaths}
17
+ * @param {!Array} ps The property names to merge
18
+ * @param {!Object} obj The object to query
19
+ * @return {!Object} The object composed of merged properties of obj
20
+ * @example
21
+ *
22
+ * const obj = {
23
+ * foo: { fooInner: 1 },
24
+ * bar: { barInner: 2 }
25
+ * };
26
+ *
27
+ * { ...obj.foo, ...obj.bar }; //=> { fooInner: 1, barInner: 2 }
28
+ * RA.mergeProps(['foo', 'bar'], obj); //=> { fooInner: 1, barInner: 2 }
29
+ */
30
+ var mergeProps = (0, _ramda.curryN)(2, (0, _ramda.pipe)(_ramda.props, _ramda.mergeAll));
31
+ var _default = mergeProps;
32
+ exports["default"] = _default;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports["default"] = void 0;
5
+
6
+ var _ramda = require("ramda");
7
+
8
+ /**
9
+ * Create a new object with the own properties of the second object merged with
10
+ * the own properties of the first object. If a key exists in both objects,
11
+ * the value from the first object will be used. *
12
+ * Putting it simply: it sets properties only if they don't exist.
13
+ *
14
+ * @func mergeRight
15
+ * @deprecated since v2.12.0; available in ramda@0.26.0 as R.mergeLeft
16
+ * @aliases mergeLeft, resetToDefault
17
+ * @memberOf RA
18
+ * @since {@link https://char0n.github.io/ramda-adjunct/1.6.0|v1.6.0}
19
+ * @category Object
20
+ * @sig {k: v} -> {k: v} -> {k: v}
21
+ * @param {Object} r Destination
22
+ * @param {Object} l Source
23
+ * @return {Object}
24
+ * @see {@link http://ramdajs.com/docs/#merge|R.merge}, {@link https://github.com/ramda/ramda/wiki/Cookbook#set-properties-only-if-they-dont-exist|Ramda Cookbook}
25
+ * @example
26
+ *
27
+ * RA.mergeRight({ 'age': 40 }, { 'name': 'fred', 'age': 10 });
28
+ * //=> { 'name': 'fred', 'age': 40 }
29
+ */
30
+ var mergeRight = (0, _ramda.flip)(_ramda.merge);
31
+ var _default = mergeRight;
32
+ exports["default"] = _default;