ramda-adjunct 3.2.0 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (483) hide show
  1. package/.nvmrc +1 -1
  2. package/CHANGELOG.md +23 -0
  3. package/README.md +1 -1
  4. package/dist/RA.node.js +165 -1571
  5. package/dist/RA.node.min.js +1 -1
  6. package/dist/RA.web.js +165 -1571
  7. package/dist/RA.web.min.js +1 -1
  8. package/dist/RA.web.standalone.js +166 -1571
  9. package/dist/RA.web.standalone.min.js +1 -1
  10. package/es/Y.js +1 -0
  11. package/es/allEqual.js +3 -2
  12. package/es/allEqualTo.js +1 -1
  13. package/es/allIdentical.js +1 -1
  14. package/es/allIdenticalTo.js +1 -1
  15. package/es/allP.js +1 -1
  16. package/es/allSettledP.js +1 -1
  17. package/es/allUnique.js +1 -1
  18. package/es/anyP.js +1 -1
  19. package/es/appendFlipped.js +1 -1
  20. package/es/argsPass.js +1 -1
  21. package/es/async.js +1 -5
  22. package/es/cata.js +1 -4
  23. package/es/catchP.js +1 -1
  24. package/es/ceil.js +1 -0
  25. package/es/compact.js +1 -1
  26. package/es/concatAll.js +1 -1
  27. package/es/concatRight.js +1 -1
  28. package/es/copyKeys.js +5 -5
  29. package/es/curryRight.js +1 -1
  30. package/es/curryRightN.js +1 -2
  31. package/es/defaultWhen.js +1 -1
  32. package/es/delayP.js +1 -3
  33. package/es/dispatch.js +1 -10
  34. package/es/divideNum.js +1 -1
  35. package/es/dropArgs.js +1 -1
  36. package/es/ensureArray.js +1 -1
  37. package/es/escapeRegExp.js +1 -1
  38. package/es/fantasy-land/Identity.js +15 -20
  39. package/es/fantasy-land/traits.js +4 -5
  40. package/es/fantasy-land/util.js +8 -4
  41. package/es/filterIndexed.js +1 -1
  42. package/es/findOr.js +1 -0
  43. package/es/flattenDepth.js +1 -12
  44. package/es/flattenPath.js +1 -1
  45. package/es/flattenProp.js +1 -1
  46. package/es/floor.js +1 -0
  47. package/es/fnull.js +1 -1
  48. package/es/inRange.js +1 -1
  49. package/es/included.js +1 -1
  50. package/es/index.js +18 -29
  51. package/es/internal/ap.js +0 -1
  52. package/es/internal/isOfTypeObject.js +0 -2
  53. package/es/internal/makeFlat.js +1 -6
  54. package/es/internal/ponyfills/Array.from.js +0 -12
  55. package/es/internal/ponyfills/Math.sign.js +0 -1
  56. package/es/internal/ponyfills/Math.trunc.js +2 -5
  57. package/es/internal/ponyfills/Number.isFinite.js +2 -1
  58. package/es/internal/ponyfills/Number.isNaN.js +2 -1
  59. package/es/internal/ponyfills/Promise.allSettled.js +0 -10
  60. package/es/internal/ponyfills/Promise.any.js +3 -31
  61. package/es/internal/ponyfills/String.padEnd.js +0 -6
  62. package/es/internal/ponyfills/String.padStart.js +4 -9
  63. package/es/internal/ponyfills/String.repeat.js +3 -13
  64. package/es/internal/ponyfills/String.replaceAll.js +0 -5
  65. package/es/invoke.js +1 -1
  66. package/es/invokeArgs.js +1 -0
  67. package/es/isArray.js +1 -1
  68. package/es/isArrayLike.js +2 -11
  69. package/es/isAsyncFunction.js +1 -1
  70. package/es/isBigInt.js +1 -1
  71. package/es/isBlank.js +0 -1
  72. package/es/isBoolean.js +1 -1
  73. package/es/isDate.js +1 -1
  74. package/es/isEmptyArray.js +1 -1
  75. package/es/isEmptyString.js +1 -1
  76. package/es/isError.js +1 -1
  77. package/es/isEven.js +1 -1
  78. package/es/isFalse.js +1 -0
  79. package/es/isFalsy.js +1 -1
  80. package/es/isFinite.js +1 -2
  81. package/es/isFloat.js +1 -1
  82. package/es/isFunction.js +1 -1
  83. package/es/isGeneratorFunction.js +2 -13
  84. package/es/isIndexed.js +1 -0
  85. package/es/isInteger.js +1 -1
  86. package/es/isInteger32.js +1 -1
  87. package/es/isIterable.js +1 -2
  88. package/es/isMap.js +1 -0
  89. package/es/isNaN.js +1 -2
  90. package/es/isNaturalNumber.js +1 -0
  91. package/es/isNegative.js +1 -1
  92. package/es/isNegativeZero.js +1 -1
  93. package/es/isNilOrEmpty.js +1 -1
  94. package/es/isNonEmptyArray.js +1 -1
  95. package/es/isNonEmptyString.js +1 -1
  96. package/es/isNonNegative.js +1 -1
  97. package/es/isNonPositive.js +1 -1
  98. package/es/isNotArray.js +1 -1
  99. package/es/isNotArrayLike.js +1 -1
  100. package/es/isNotAsyncFunction.js +1 -3
  101. package/es/isNotBoolean.js +1 -1
  102. package/es/isNotDate.js +1 -1
  103. package/es/isNotEmpty.js +1 -1
  104. package/es/isNotFinite.js +1 -1
  105. package/es/isNotFloat.js +1 -1
  106. package/es/isNotFunction.js +1 -3
  107. package/es/isNotGeneratorFunction.js +1 -3
  108. package/es/isNotInteger.js +1 -1
  109. package/es/isNotMap.js +1 -0
  110. package/es/isNotNaN.js +1 -1
  111. package/es/isNotNil.js +1 -1
  112. package/es/isNotNilOrEmpty.js +1 -1
  113. package/es/isNotNull.js +1 -1
  114. package/es/isNotNumber.js +1 -1
  115. package/es/isNotObj.js +1 -3
  116. package/es/isNotObjLike.js +1 -3
  117. package/es/isNotPair.js +1 -1
  118. package/es/isNotPlainObj.js +1 -3
  119. package/es/isNotPrimitive.js +2 -0
  120. package/es/isNotRegExp.js +1 -1
  121. package/es/isNotSet.js +1 -0
  122. package/es/isNotString.js +1 -1
  123. package/es/isNotUndefined.js +1 -1
  124. package/es/isNotValidDate.js +1 -1
  125. package/es/isNotValidNumber.js +1 -1
  126. package/es/isNull.js +1 -1
  127. package/es/isNumber.js +1 -1
  128. package/es/isObj.js +1 -3
  129. package/es/isObjLike.js +1 -3
  130. package/es/isOdd.js +1 -1
  131. package/es/isPair.js +1 -1
  132. package/es/isPlainObj.js +1 -6
  133. package/es/isPositive.js +1 -1
  134. package/es/isPositiveZero.js +1 -1
  135. package/es/isPrimitive.js +2 -0
  136. package/es/isPromise.js +1 -1
  137. package/es/isPrototypeOf.js +1 -1
  138. package/es/isRegExp.js +1 -1
  139. package/es/isSafeInteger.js +1 -0
  140. package/es/isSentinelValue.js +1 -1
  141. package/es/isSet.js +1 -0
  142. package/es/isSparseArray.js +1 -1
  143. package/es/isString.js +1 -1
  144. package/es/isSymbol.js +1 -2
  145. package/es/isThenable.js +1 -1
  146. package/es/isTrue.js +1 -0
  147. package/es/isTruthy.js +1 -1
  148. package/es/isUinteger32.js +1 -1
  149. package/es/isUndefined.js +1 -1
  150. package/es/isValidDate.js +1 -3
  151. package/es/isValidNumber.js +1 -1
  152. package/es/lastP.js +1 -9
  153. package/es/lengthEq.js +1 -1
  154. package/es/lengthGt.js +1 -1
  155. package/es/lengthGte.js +1 -1
  156. package/es/lengthLt.js +1 -1
  157. package/es/lengthLte.js +1 -1
  158. package/es/lengthNotEq.js +1 -1
  159. package/es/lensEq.js +1 -1
  160. package/es/lensIso.js +9 -8
  161. package/es/lensNotEq.js +1 -1
  162. package/es/lensNotSatisfy.js +1 -1
  163. package/es/lensSatisfies.js +1 -1
  164. package/es/lensTraverse.js +1 -1
  165. package/es/liftF.js +1 -1
  166. package/es/liftFN.js +1 -2
  167. package/es/list.js +1 -1
  168. package/es/mapIndexed.js +1 -1
  169. package/es/mergePath.js +1 -1
  170. package/es/mergePaths.js +1 -1
  171. package/es/mergeProp.js +1 -1
  172. package/es/mergeProps.js +1 -1
  173. package/es/move.js +1 -1
  174. package/es/nand.js +1 -1
  175. package/es/neither.js +1 -3
  176. package/es/noneP.js +1 -1
  177. package/es/nonePass.js +1 -1
  178. package/es/noop.js +1 -1
  179. package/es/nor.js +1 -1
  180. package/es/notAllPass.js +1 -1
  181. package/es/notAllUnique.js +1 -1
  182. package/es/notBoth.js +1 -3
  183. package/es/notEqual.js +1 -1
  184. package/es/omitBy.js +1 -3
  185. package/es/omitIndexes.js +3 -2
  186. package/es/overlaps.js +1 -1
  187. package/es/padCharsEnd.js +1 -1
  188. package/es/padCharsStart.js +1 -1
  189. package/es/padEnd.js +1 -1
  190. package/es/padStart.js +1 -1
  191. package/es/pathNotEq.js +1 -3
  192. package/es/pathOrLazy.js +1 -1
  193. package/es/paths.js +1 -1
  194. package/es/pickIndexes.js +3 -2
  195. package/es/propNotEq.js +1 -1
  196. package/es/rangeStep.js +1 -1
  197. package/es/reduceIndexed.js +1 -1
  198. package/es/reduceP.js +4 -16
  199. package/es/reduceRightP.js +6 -19
  200. package/es/rejectP.js +1 -1
  201. package/es/renameKeyWith.js +1 -1
  202. package/es/renameKeys.js +1 -4
  203. package/es/renameKeysWith.js +1 -1
  204. package/es/repeatStr.js +1 -1
  205. package/es/replaceAll.js +1 -1
  206. package/es/resolveP.js +1 -3
  207. package/es/round.js +1 -0
  208. package/es/seq.js +1 -2
  209. package/es/sign.js +1 -0
  210. package/es/skipTake.js +1 -0
  211. package/es/sliceFrom.js +1 -1
  212. package/es/sliceTo.js +1 -1
  213. package/es/sortByPaths.js +1 -0
  214. package/es/sortByProp.js +42 -0
  215. package/es/sortByProps.js +3 -11
  216. package/es/spreadPath.js +1 -1
  217. package/es/spreadProp.js +1 -1
  218. package/es/stubArray.js +1 -1
  219. package/es/stubNull.js +1 -1
  220. package/es/stubObj.js +1 -1
  221. package/es/stubString.js +1 -1
  222. package/es/stubUndefined.js +1 -1
  223. package/es/subtractNum.js +1 -1
  224. package/es/thenCatchP.js +1 -1
  225. package/es/toArray.js +1 -0
  226. package/es/toInteger32.js +0 -1
  227. package/es/toNumber.js +1 -1
  228. package/es/toUinteger32.js +2 -1
  229. package/es/trimCharsEnd.js +1 -0
  230. package/es/trimCharsStart.js +1 -0
  231. package/es/trimEnd.js +1 -0
  232. package/es/trimStart.js +1 -0
  233. package/es/trunc.js +1 -0
  234. package/es/unzipObjWith.js +1 -1
  235. package/es/viewOr.js +1 -0
  236. package/es/weave.js +1 -1
  237. package/es/weaveLazy.js +1 -1
  238. package/es/zipObjWith.js +1 -1
  239. package/lib/Y.js +1 -2
  240. package/lib/allEqual.js +0 -4
  241. package/lib/allEqualTo.js +0 -2
  242. package/lib/allIdentical.js +0 -4
  243. package/lib/allIdenticalTo.js +0 -2
  244. package/lib/allP.js +0 -2
  245. package/lib/allSettledP.js +1 -6
  246. package/lib/allUnique.js +0 -4
  247. package/lib/anyP.js +0 -10
  248. package/lib/appendFlipped.js +0 -2
  249. package/lib/argsPass.js +0 -5
  250. package/lib/async.js +0 -9
  251. package/lib/cata.js +0 -7
  252. package/lib/catchP.js +0 -2
  253. package/lib/ceil.js +1 -2
  254. package/lib/compact.js +0 -4
  255. package/lib/concatAll.js +1 -5
  256. package/lib/concatRight.js +0 -2
  257. package/lib/copyKeys.js +4 -8
  258. package/lib/curryRight.js +0 -4
  259. package/lib/curryRightN.js +0 -3
  260. package/lib/defaultWhen.js +0 -2
  261. package/lib/delayP.js +1 -8
  262. package/lib/dispatch.js +0 -15
  263. package/lib/divideNum.js +0 -2
  264. package/lib/dropArgs.js +0 -2
  265. package/lib/ensureArray.js +0 -4
  266. package/lib/escapeRegExp.js +0 -4
  267. package/lib/fantasy-land/Identity.js +14 -27
  268. package/lib/fantasy-land/traits.js +4 -28
  269. package/lib/fantasy-land/util.js +6 -5
  270. package/lib/filterIndexed.js +0 -2
  271. package/lib/findOr.js +1 -2
  272. package/lib/flattenDepth.js +1 -14
  273. package/lib/flattenPath.js +0 -2
  274. package/lib/flattenProp.js +0 -4
  275. package/lib/floor.js +1 -2
  276. package/lib/fnull.js +1 -6
  277. package/lib/inRange.js +1 -4
  278. package/lib/included.js +0 -2
  279. package/lib/index.js +4 -425
  280. package/lib/internal/ap.js +0 -9
  281. package/lib/internal/compareLength.js +0 -2
  282. package/lib/internal/isCoercible.js +0 -6
  283. package/lib/internal/isOfTypeObject.js +0 -3
  284. package/lib/internal/makeFlat.js +0 -8
  285. package/lib/internal/ponyfills/Array.from.js +0 -18
  286. package/lib/internal/ponyfills/Math.sign.js +0 -2
  287. package/lib/internal/ponyfills/Math.trunc.js +2 -7
  288. package/lib/internal/ponyfills/Number.isFinite.js +0 -4
  289. package/lib/internal/ponyfills/Number.isInteger.js +0 -4
  290. package/lib/internal/ponyfills/Number.isNaN.js +0 -4
  291. package/lib/internal/ponyfills/Number.isSafeInteger.js +0 -5
  292. package/lib/internal/ponyfills/Promise.allSettled.js +0 -14
  293. package/lib/internal/ponyfills/Promise.any.js +3 -36
  294. package/lib/internal/ponyfills/String.padEnd.js +0 -10
  295. package/lib/internal/ponyfills/String.padStart.js +4 -13
  296. package/lib/internal/ponyfills/String.repeat.js +3 -16
  297. package/lib/internal/ponyfills/String.replaceAll.js +0 -9
  298. package/lib/internal/ponyfills/String.trimEnd.js +0 -2
  299. package/lib/internal/ponyfills/String.trimStart.js +0 -2
  300. package/lib/invoke.js +0 -4
  301. package/lib/invokeArgs.js +1 -5
  302. package/lib/isArray.js +0 -4
  303. package/lib/isArrayLike.js +0 -16
  304. package/lib/isAsyncFunction.js +0 -2
  305. package/lib/isBigInt.js +0 -2
  306. package/lib/isBlank.js +0 -4
  307. package/lib/isBoolean.js +0 -2
  308. package/lib/isDate.js +0 -2
  309. package/lib/isEmptyArray.js +0 -4
  310. package/lib/isEmptyString.js +0 -2
  311. package/lib/isError.js +0 -2
  312. package/lib/isEven.js +0 -5
  313. package/lib/isFalse.js +1 -2
  314. package/lib/isFalsy.js +0 -4
  315. package/lib/isFinite.js +1 -8
  316. package/lib/isFloat.js +0 -5
  317. package/lib/isFunction.js +0 -5
  318. package/lib/isGeneratorFunction.js +1 -15
  319. package/lib/isIndexed.js +1 -5
  320. package/lib/isInteger.js +1 -6
  321. package/lib/isInteger32.js +0 -4
  322. package/lib/isIterable.js +0 -5
  323. package/lib/isMap.js +1 -2
  324. package/lib/isNaN.js +1 -8
  325. package/lib/isNaturalNumber.js +1 -5
  326. package/lib/isNegative.js +0 -4
  327. package/lib/isNegativeZero.js +0 -2
  328. package/lib/isNilOrEmpty.js +0 -2
  329. package/lib/isNonEmptyArray.js +0 -5
  330. package/lib/isNonEmptyString.js +0 -6
  331. package/lib/isNonNegative.js +0 -4
  332. package/lib/isNonPositive.js +0 -4
  333. package/lib/isNotArray.js +0 -4
  334. package/lib/isNotArrayLike.js +0 -4
  335. package/lib/isNotAsyncFunction.js +0 -6
  336. package/lib/isNotBoolean.js +0 -4
  337. package/lib/isNotDate.js +0 -4
  338. package/lib/isNotEmpty.js +0 -2
  339. package/lib/isNotFinite.js +0 -4
  340. package/lib/isNotFloat.js +0 -4
  341. package/lib/isNotFunction.js +0 -6
  342. package/lib/isNotGeneratorFunction.js +0 -6
  343. package/lib/isNotInteger.js +0 -4
  344. package/lib/isNotMap.js +1 -4
  345. package/lib/isNotNaN.js +0 -4
  346. package/lib/isNotNil.js +0 -2
  347. package/lib/isNotNilOrEmpty.js +0 -4
  348. package/lib/isNotNull.js +0 -4
  349. package/lib/isNotNumber.js +0 -4
  350. package/lib/isNotObj.js +0 -6
  351. package/lib/isNotObjLike.js +0 -6
  352. package/lib/isNotPair.js +0 -4
  353. package/lib/isNotPlainObj.js +0 -6
  354. package/lib/isNotPrimitive.js +2 -4
  355. package/lib/isNotRegExp.js +0 -4
  356. package/lib/isNotSet.js +1 -4
  357. package/lib/isNotString.js +0 -4
  358. package/lib/isNotUndefined.js +0 -4
  359. package/lib/isNotValidDate.js +0 -4
  360. package/lib/isNotValidNumber.js +0 -4
  361. package/lib/isNull.js +0 -2
  362. package/lib/isNumber.js +0 -2
  363. package/lib/isObj.js +0 -8
  364. package/lib/isObjLike.js +0 -7
  365. package/lib/isOdd.js +0 -4
  366. package/lib/isPair.js +0 -4
  367. package/lib/isPlainObj.js +1 -12
  368. package/lib/isPositive.js +0 -4
  369. package/lib/isPositiveZero.js +0 -2
  370. package/lib/isPrimitive.js +2 -11
  371. package/lib/isPromise.js +0 -4
  372. package/lib/isPrototypeOf.js +0 -4
  373. package/lib/isRegExp.js +0 -2
  374. package/lib/isSafeInteger.js +1 -6
  375. package/lib/isSentinelValue.js +0 -4
  376. package/lib/isSet.js +1 -2
  377. package/lib/isSparseArray.js +0 -4
  378. package/lib/isString.js +0 -2
  379. package/lib/isSymbol.js +0 -3
  380. package/lib/isThenable.js +0 -4
  381. package/lib/isTrue.js +1 -2
  382. package/lib/isTruthy.js +0 -2
  383. package/lib/isUinteger32.js +0 -4
  384. package/lib/isUndefined.js +0 -4
  385. package/lib/isValidDate.js +0 -7
  386. package/lib/isValidNumber.js +0 -5
  387. package/lib/lastP.js +0 -16
  388. package/lib/lengthEq.js +0 -4
  389. package/lib/lengthGt.js +0 -4
  390. package/lib/lengthGte.js +0 -4
  391. package/lib/lengthLt.js +0 -4
  392. package/lib/lengthLte.js +0 -4
  393. package/lib/lengthNotEq.js +0 -4
  394. package/lib/lensEq.js +0 -2
  395. package/lib/lensIso.js +6 -8
  396. package/lib/lensNotEq.js +0 -4
  397. package/lib/lensNotSatisfy.js +0 -4
  398. package/lib/lensSatisfies.js +0 -4
  399. package/lib/lensTraverse.js +0 -4
  400. package/lib/liftF.js +0 -4
  401. package/lib/liftFN.js +0 -5
  402. package/lib/list.js +0 -2
  403. package/lib/mapIndexed.js +0 -2
  404. package/lib/mergePath.js +0 -2
  405. package/lib/mergePaths.js +0 -4
  406. package/lib/mergeProp.js +0 -4
  407. package/lib/mergeProps.js +0 -2
  408. package/lib/move.js +0 -2
  409. package/lib/nand.js +0 -3
  410. package/lib/neither.js +0 -4
  411. package/lib/noneP.js +0 -6
  412. package/lib/nonePass.js +0 -2
  413. package/lib/noop.js +0 -4
  414. package/lib/nor.js +0 -3
  415. package/lib/notAllPass.js +0 -2
  416. package/lib/notAllUnique.js +0 -4
  417. package/lib/notBoth.js +0 -4
  418. package/lib/notEqual.js +0 -2
  419. package/lib/omitBy.js +0 -4
  420. package/lib/omitIndexes.js +1 -3
  421. package/lib/overlaps.js +1 -5
  422. package/lib/padCharsEnd.js +1 -6
  423. package/lib/padCharsStart.js +1 -6
  424. package/lib/padEnd.js +0 -3
  425. package/lib/padStart.js +0 -3
  426. package/lib/pathNotEq.js +0 -4
  427. package/lib/pathOrLazy.js +0 -2
  428. package/lib/paths.js +0 -2
  429. package/lib/pickIndexes.js +1 -3
  430. package/lib/propNotEq.js +0 -2
  431. package/lib/rangeStep.js +0 -4
  432. package/lib/reduceIndexed.js +0 -2
  433. package/lib/reduceP.js +3 -21
  434. package/lib/reduceRightP.js +4 -24
  435. package/lib/rejectP.js +0 -2
  436. package/lib/renameKeyWith.js +0 -4
  437. package/lib/renameKeys.js +1 -7
  438. package/lib/renameKeysWith.js +0 -2
  439. package/lib/repeatStr.js +1 -6
  440. package/lib/replaceAll.js +1 -6
  441. package/lib/resolveP.js +0 -4
  442. package/lib/round.js +1 -2
  443. package/lib/seq.js +1 -4
  444. package/lib/sign.js +1 -6
  445. package/lib/skipTake.js +1 -2
  446. package/lib/sliceFrom.js +0 -2
  447. package/lib/sliceTo.js +0 -2
  448. package/lib/sortByPaths.js +1 -2
  449. package/lib/sortByProp.js +47 -0
  450. package/lib/sortByProps.js +3 -13
  451. package/lib/spreadPath.js +0 -2
  452. package/lib/spreadProp.js +0 -4
  453. package/lib/stubArray.js +1 -2
  454. package/lib/stubNull.js +0 -2
  455. package/lib/stubObj.js +1 -2
  456. package/lib/stubString.js +0 -2
  457. package/lib/stubUndefined.js +0 -3
  458. package/lib/subtractNum.js +0 -2
  459. package/lib/thenCatchP.js +0 -2
  460. package/lib/toArray.js +1 -6
  461. package/lib/toInteger32.js +0 -2
  462. package/lib/toNumber.js +0 -4
  463. package/lib/toUinteger32.js +1 -2
  464. package/lib/trimCharsEnd.js +1 -4
  465. package/lib/trimCharsStart.js +1 -4
  466. package/lib/trimEnd.js +1 -6
  467. package/lib/trimStart.js +1 -6
  468. package/lib/trunc.js +1 -6
  469. package/lib/unzipObjWith.js +0 -4
  470. package/lib/viewOr.js +1 -2
  471. package/lib/weave.js +0 -2
  472. package/lib/weaveLazy.js +0 -2
  473. package/lib/zipObjWith.js +0 -2
  474. package/package.json +34 -32
  475. package/src/index.js +1 -0
  476. package/src/isGeneratorFunction.js +2 -19
  477. package/src/isNotPrimitive.js +1 -0
  478. package/src/isPrimitive.js +1 -0
  479. package/src/sortByProp.js +45 -0
  480. package/src/sortByProps.js +1 -1
  481. package/types/.eslintrc.js +23 -0
  482. package/types/dtslint.eslint.js +13 -0
  483. package/types/index.d.ts +1792 -1551
package/es/Y.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { curryN } from 'ramda';
2
+
2
3
  /**
3
4
  * Y-combinator
4
5
  *
package/es/allEqual.js CHANGED
@@ -1,5 +1,7 @@
1
1
  import { pipe, uniq, curryN } from 'ramda';
2
- import lengthLte from './lengthLte'; // Original idea for this function was conceived by https://github.com/jackmellis
2
+ import lengthLte from './lengthLte';
3
+
4
+ // Original idea for this function was conceived by https://github.com/jackmellis
3
5
  // in https://github.com/char0n/ramda-adjunct/pull/513.
4
6
 
5
7
  /**
@@ -20,6 +22,5 @@ import lengthLte from './lengthLte'; // Original idea for this function was conc
20
22
  * RA.allEqual([]); //=> true
21
23
  *
22
24
  */
23
-
24
25
  var allEqual = curryN(1, pipe(uniq, lengthLte(1)));
25
26
  export default allEqual;
package/es/allEqualTo.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { all, equals, curry } from 'ramda';
2
+
2
3
  /**
3
4
  * Returns true if all items in the list are equivalent to user provided value using `R.equals` for equality comparisons.
4
5
  *
@@ -19,7 +20,6 @@ import { all, equals, curry } from 'ramda';
19
20
  * RA.allEqualTo(1, []); //=> true
20
21
  *
21
22
  */
22
-
23
23
  var allEqualTo = curry(function (val, list) {
24
24
  return all(equals(val), list);
25
25
  });
@@ -1,5 +1,6 @@
1
1
  import { uniqWith, identical, pipe, curryN } from 'ramda';
2
2
  import lengthLte from './lengthLte';
3
+
3
4
  /**
4
5
  * Returns true if all items in the list are equivalent using `R.identical` for equality comparisons.
5
6
  *
@@ -19,6 +20,5 @@ import lengthLte from './lengthLte';
19
20
  * RA.allIdentical([ {}, {} ]); //=> false
20
21
  * RA.allIdentical([ () => {}, () => {} ]); //=> false
21
22
  */
22
-
23
23
  var allIdentical = curryN(1, pipe(uniqWith(identical), lengthLte(1)));
24
24
  export default allIdentical;
@@ -1,4 +1,5 @@
1
1
  import { curry, identical, all } from 'ramda';
2
+
2
3
  /**
3
4
  * Returns true if all items in the list are equivalent to user provided value using `R.identical` for equality comparisons.
4
5
  *
@@ -19,7 +20,6 @@ import { curry, identical, all } from 'ramda';
19
20
  * RA.allIdenticalTo({}, [ {}, {} ]); //=> false
20
21
  *
21
22
  */
22
-
23
23
  var allIdenticalTo = curry(function (val, list) {
24
24
  return all(identical(val), list);
25
25
  });
package/es/allP.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { bind, curryN } from 'ramda';
2
+
2
3
  /**
3
4
  * Composable shortcut for `Promise.all`.
4
5
  *
@@ -21,6 +22,5 @@ import { bind, curryN } from 'ramda';
21
22
  * RA.allP([Promise.resolve(1), Promise.resolve(2)]); //=> Promise([1, 2])
22
23
  * RA.allP([1, Promise.reject(2)]); //=> Promise(2)
23
24
  */
24
-
25
25
  var allP = curryN(1, bind(Promise.all, Promise));
26
26
  export default allP;
package/es/allSettledP.js CHANGED
@@ -2,6 +2,7 @@ import { bind, curryN } from 'ramda';
2
2
  import isFunction from './isFunction';
3
3
  import ponyfill from './internal/ponyfills/Promise.allSettled';
4
4
  export var allSettledPPonyfill = curryN(1, ponyfill);
5
+
5
6
  /**
6
7
  * Returns a promise that is fulfilled with an array of promise state snapshots,
7
8
  * but only after all the original promises have settled, i.e. become either fulfilled or rejected.
@@ -24,6 +25,5 @@ export var allSettledPPonyfill = curryN(1, ponyfill);
24
25
  * Promise.reject(3),
25
26
  * ]); //=> Promise([{ status: 'fulfilled', value: 1 }, { status: 'fulfilled', value: 2 }, { status: 'rejected', reason: 3 }])
26
27
  */
27
-
28
28
  var allSettledP = isFunction(Promise.allSettled) ? curryN(1, bind(Promise.allSettled, Promise)) : allSettledPPonyfill;
29
29
  export default allSettledP;
package/es/allUnique.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { converge, length, uniq } from 'ramda';
2
2
  import lengthEq from './lengthEq';
3
+
3
4
  /**
4
5
  * Returns true if all items in the list are unique. `R.equals` is used to determine equality.
5
6
  *
@@ -18,6 +19,5 @@ import lengthEq from './lengthEq';
18
19
  * RA.allUnique([]); //=> true
19
20
  *
20
21
  */
21
-
22
22
  var allUnique = converge(lengthEq, [length, uniq]);
23
23
  export default allUnique;
package/es/anyP.js CHANGED
@@ -3,6 +3,7 @@ import isFunction from './isFunction';
3
3
  import ponyfill, { AggregatedError } from './internal/ponyfills/Promise.any';
4
4
  export var anyPPonyfill = curryN(1, ponyfill);
5
5
  export { AggregatedError };
6
+
6
7
  /**
7
8
  * Returns a promise that is fulfilled by the first given promise to be fulfilled,
8
9
  * or rejected with an array of rejection reasons if all of the given promises are rejected.
@@ -23,6 +24,5 @@ export { AggregatedError };
23
24
  * Promise.reject(3),
24
25
  * ]); //=> Promise(1)
25
26
  */
26
-
27
27
  var anyP = isFunction(Promise.any) ? curryN(1, bind(Promise.any, Promise)) : anyPPonyfill;
28
28
  export default anyP;
@@ -1,4 +1,5 @@
1
1
  import { append, flip } from 'ramda';
2
+
2
3
  /**
3
4
  * Returns a new list containing the contents of the given list, followed by the given element.
4
5
  * Like {@link http://ramdajs.com/docs/#append|R.append} but with argument order reversed.
@@ -18,6 +19,5 @@ import { append, flip } from 'ramda';
18
19
  * RA.appendFlipped([], 'tests'); //=> ['tests']
19
20
  * RA.appendFlipped(['write', 'more'], ['tests']); //=> ['write', 'more', ['tests']]
20
21
  */
21
-
22
22
  var appendFlipped = flip(append);
23
23
  export default appendFlipped;
package/es/argsPass.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { useWith, curry, compose } from 'ramda';
2
2
  import list from './list';
3
3
  import isTruthy from './isTruthy';
4
+
4
5
  /**
5
6
  * Takes a combining predicate and a list of functions and returns a function which will map the
6
7
  * arguments it receives to the list of functions and returns the result of passing the values
@@ -31,7 +32,6 @@ import isTruthy from './isTruthy';
31
32
  * RA.argsPass(R.none, [RA.isArray, RA.isBoolean, RA.isString])({}, 1, false) //=> true
32
33
  * RA.argsPass(R.none, [RA.isArray, RA.isBoolean, RA.isString])({}, 1, 'abc') //=> false
33
34
  */
34
-
35
35
  var argsPass = curry(function (combiningPredicate, predicates) {
36
36
  return useWith(compose(combiningPredicate(isTruthy), list), predicates);
37
37
  });
package/es/async.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { curryN, bind } from 'ramda';
2
2
  import resolveP from './resolveP';
3
3
  import rejectP from './rejectP';
4
+
4
5
  /**
5
6
  * Takes a generator function and returns an async function.
6
7
  * The async function returned is a curried function whose arity matches that of the generator function.
@@ -27,11 +28,9 @@ import rejectP from './rejectP';
27
28
  * asyncFn(1, 2); //=> Promise(3)
28
29
  *
29
30
  */
30
-
31
31
  var async = curryN(1, function (generatorFn) {
32
32
  function asyncWrapper() {
33
33
  var iterator = bind(generatorFn, this).apply(void 0, arguments);
34
-
35
34
  var handle = function handle(result) {
36
35
  var resolved = resolveP(result.value);
37
36
  return result.done ? resolved : resolved.then(function (value) {
@@ -40,18 +39,15 @@ var async = curryN(1, function (generatorFn) {
40
39
  return handle(iterator["throw"](error));
41
40
  });
42
41
  };
43
-
44
42
  try {
45
43
  return handle(iterator.next());
46
44
  } catch (error) {
47
45
  return rejectP(error);
48
46
  }
49
47
  }
50
-
51
48
  if (generatorFn.length > 0) {
52
49
  return curryN(generatorFn.length, asyncWrapper);
53
50
  }
54
-
55
51
  return asyncWrapper;
56
52
  });
57
53
  export default async;
package/es/cata.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { curry } from 'ramda';
2
2
  import isFunction from './isFunction';
3
+
3
4
  /**
4
5
  * The catamorphism is a way of folding a type into a value.
5
6
  *
@@ -52,7 +53,6 @@ import isFunction from './isFunction';
52
53
  * RA.cata(identity, identity, maybeSome); //=> 1
53
54
  * RA.cata(identity, identity, maybeNothing); //=> undefined
54
55
  */
55
-
56
56
  var catamorphism = curry(function (leftFn, rightFn, catamorphicObj) {
57
57
  // folktale support
58
58
  if (isFunction(catamorphicObj.matchWith)) {
@@ -85,17 +85,14 @@ var catamorphism = curry(function (leftFn, rightFn, catamorphicObj) {
85
85
  }
86
86
  });
87
87
  }
88
-
89
88
  if (isFunction(catamorphicObj.cata)) {
90
89
  return catamorphicObj.cata(leftFn, rightFn);
91
90
  }
92
-
93
91
  if (isFunction(catamorphicObj.getOrElse)) {
94
92
  var elseValue = "RA.cata".concat(Math.random());
95
93
  var value = catamorphicObj.getOrElse(elseValue);
96
94
  return value === elseValue ? leftFn() : rightFn(value);
97
95
  }
98
-
99
96
  return catamorphicObj.either(leftFn, rightFn);
100
97
  });
101
98
  export default catamorphism;
package/es/catchP.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { invoker } from 'ramda';
2
+
2
3
  /**
3
4
  * Composable shortcut for `Promise.catch`.
4
5
  * The catchP function returns a Promise. It takes two arguments: a callback function for the failure of the Promise
@@ -19,6 +20,5 @@ import { invoker } from 'ramda';
19
20
  * RA.catchP(() => 'b', Promise.resolve('a')); //=> Promise('a')
20
21
  * RA.catchP(() => 'b', Promise.reject('a')); //=> Promise('b')
21
22
  */
22
-
23
23
  var catchP = invoker(1, 'catch');
24
24
  export default catchP;
package/es/ceil.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { bind, curryN } from 'ramda';
2
+
2
3
  /**
3
4
  * Returns the smallest integer greater than or equal to a given number.
4
5
  *
package/es/compact.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { reject } from 'ramda';
2
2
  import isFalsy from './isFalsy';
3
+
3
4
  /**
4
5
  * Creates an array with all falsy values removed.
5
6
  * The values false, null, 0, "", undefined, and NaN are falsy.
@@ -16,6 +17,5 @@ import isFalsy from './isFalsy';
16
17
  *
17
18
  * RA.compact([0, 1, false, 2, '', 3]); //=> [1, 2, 3]
18
19
  */
19
-
20
20
  var compact = reject(isFalsy);
21
21
  export default compact;
package/es/concatAll.js CHANGED
@@ -3,6 +3,7 @@ import stubUndefined from './stubUndefined';
3
3
  var leftIdentitySemigroup = {
4
4
  concat: identity
5
5
  };
6
+
6
7
  /**
7
8
  * Returns the result of concatenating the given lists or strings.
8
9
  * Note: RA.concatAll expects all elements to be of the same type. It will throw an error if you concat an Array with a non-Array value.
@@ -25,6 +26,5 @@ var leftIdentitySemigroup = {
25
26
  * concatAll(['1', '2', '3']); //=> '123'
26
27
  * concatAll([]); //=> undefined;
27
28
  */
28
-
29
29
  var concatAll = pipe(reduce(concat, leftIdentitySemigroup), when(identical(leftIdentitySemigroup), stubUndefined));
30
30
  export default concatAll;
package/es/concatRight.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { concat, flip } from 'ramda';
2
+
2
3
  /**
3
4
  * Returns the result of concatenating the given lists or strings.
4
5
  *
@@ -24,6 +25,5 @@ import { concat, flip } from 'ramda';
24
25
  * RA.concatRight([4, 5, 6], [1, 2, 3]); //=> [1, 2, 3, 4, 5, 6]
25
26
  * RA.concatRight([], []); //=> []
26
27
  */
27
-
28
28
  var concatRight = flip(concat);
29
29
  export default concatRight;
package/es/copyKeys.js CHANGED
@@ -1,11 +1,12 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
1
2
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
-
3
3
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
-
5
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
-
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
7
  import { curryN } from 'ramda';
8
8
  import renameKeys from './renameKeys';
9
+
9
10
  /**
10
11
  * Creates a new object with the own properties of the provided object, and the
11
12
  * keys copied according to the keysMap object as `{oldKey: newKey}`.
@@ -27,7 +28,6 @@ import renameKeys from './renameKeys';
27
28
  * copyKeys({ a: 'b' }, { a: true }); //=> { a: true, b: true }
28
29
  * copyKeys({ a: 'b' }, { a: true, b: false }); //=> { a: true, b: true }
29
30
  */
30
-
31
31
  var copyKeys = curryN(2, function (keysMap, obj) {
32
32
  return _objectSpread(_objectSpread({}, obj), renameKeys(keysMap, obj));
33
33
  });
package/es/curryRight.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { converge, length, identity } from 'ramda';
2
2
  import curryRightN from './curryRightN';
3
+
3
4
  /**
4
5
  * Returns a curried equivalent of the provided function.
5
6
  * This function is like curry, except that the provided arguments order is reversed.
@@ -19,6 +20,5 @@ import curryRightN from './curryRightN';
19
20
  *
20
21
  * concatStringCurried('a')('b')('c'); // => 'cba'
21
22
  */
22
-
23
23
  var curryRight = converge(curryRightN, [length, identity]);
24
24
  export default curryRight;
package/es/curryRightN.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { curryN, reverse } from 'ramda';
2
+
2
3
  /**
3
4
  * Returns a curried equivalent of the provided function, with the specified arity.
4
5
  * This function is like curryN, except that the provided arguments order is reversed.
@@ -19,13 +20,11 @@ import { curryN, reverse } from 'ramda';
19
20
  *
20
21
  * concatStringCurried('a')('b')('c'); // => 'cba'
21
22
  */
22
-
23
23
  var curryRightN = curryN(2, function (arity, fn) {
24
24
  return curryN(arity, function wrapper() {
25
25
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
26
26
  args[_key] = arguments[_key];
27
27
  }
28
-
29
28
  return fn.apply(this, reverse(args));
30
29
  });
31
30
  });
package/es/defaultWhen.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { curry } from 'ramda';
2
+
2
3
  /**
3
4
  * Returns the second argument if predicate function returns `true`,
4
5
  * otherwise the third argument is returned.
@@ -18,7 +19,6 @@ import { curry } from 'ramda';
18
19
  * RA.defaultWhen(RA.isNull, 1, null); // => 1
19
20
  * RA.defaultWhen(RA.isNull, 1, 2); // => 2
20
21
  */
21
-
22
22
  var defaultWhen = curry(function (predicate, defaultVal, val) {
23
23
  return predicate(val) ? defaultVal : val;
24
24
  });
package/es/delayP.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { curry, propOr, partial, nth } from 'ramda';
2
2
  import isNonNegative from './isNonNegative';
3
3
  import isInteger from './isInteger';
4
+
4
5
  /**
5
6
  * Creates a promise which resolves/rejects after the specified milliseconds.
6
7
  *
@@ -22,19 +23,16 @@ import isInteger from './isInteger';
22
23
  var makeDelay = curry(function (settleFnPicker, opts) {
23
24
  var timeout;
24
25
  var value;
25
-
26
26
  if (isInteger(opts) && isNonNegative(opts)) {
27
27
  timeout = opts;
28
28
  } else {
29
29
  timeout = propOr(0, 'timeout', opts);
30
30
  value = propOr(value, 'value', opts);
31
31
  }
32
-
33
32
  return new Promise(function () {
34
33
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
35
34
  args[_key] = arguments[_key];
36
35
  }
37
-
38
36
  var settleFn = settleFnPicker(args);
39
37
  setTimeout(partial(settleFn, [value]), timeout);
40
38
  });
package/es/dispatch.js CHANGED
@@ -1,16 +1,11 @@
1
1
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
2
-
3
2
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
-
5
3
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
6
-
7
4
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
8
-
9
5
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
10
-
11
6
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
12
-
13
7
  import { sort, comparator, prop, pipe, head, curryN, reduce, reduced, curry, ifElse } from 'ramda';
8
+
14
9
  /**
15
10
  * Can be used as a way to compose multiple invokers together to form polymorphic functions,
16
11
  * or functions that exhibit different behaviors based on their argument(s).
@@ -47,7 +42,6 @@ import { sort, comparator, prop, pipe, head, curryN, reduce, reduced, curry, ifE
47
42
  * ]);
48
43
  * fnSwitch(1); //=> 2
49
44
  */
50
-
51
45
  import isNotNil from './isNotNil';
52
46
  import isNonEmptyArray from './isNonEmptyArray';
53
47
  import stubUndefined from './stubUndefined';
@@ -59,17 +53,14 @@ var iteratorFn = curry(function (args, accumulator, fn) {
59
53
  var result = fn.apply(void 0, _toConsumableArray(args));
60
54
  return isNotNil(result) ? reduced(result) : accumulator;
61
55
  });
62
-
63
56
  var dispatchImpl = function dispatchImpl(functions) {
64
57
  var arity = getMaxArity(functions);
65
58
  return curryN(arity, function () {
66
59
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
67
60
  args[_key] = arguments[_key];
68
61
  }
69
-
70
62
  return reduce(iteratorFn(args), undefined, functions);
71
63
  });
72
64
  };
73
-
74
65
  var dispatch = ifElse(isNonEmptyArray, dispatchImpl, stubUndefined);
75
66
  export default dispatch;
package/es/divideNum.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { divide, flip } from 'ramda';
2
+
2
3
  /**
3
4
  * Divides two numbers, where the second number is divided by the first number.
4
5
  *
@@ -14,6 +15,5 @@ import { divide, flip } from 'ramda';
14
15
  *
15
16
  * RA.divideNum(2, 1); //=> 0.5
16
17
  */
17
-
18
18
  var divideNum = flip(divide);
19
19
  export default divideNum;
package/es/dropArgs.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { nAry } from 'ramda';
2
+
2
3
  /**
3
4
  * Accepts a function with any arity and returns a function with arity of zero.
4
5
  * The returned function ignores any arguments supplied to it.
@@ -17,6 +18,5 @@ import { nAry } from 'ramda';
17
18
  *
18
19
  * RA.dropArgs(fn)('ignore1', 'ignore2'); //=> 3
19
20
  */
20
-
21
21
  var dropArgs = nAry(0);
22
22
  export default dropArgs;
package/es/ensureArray.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { when, of } from 'ramda';
2
2
  import isNotArray from './isNotArray';
3
+
3
4
  /**
4
5
  * Returns a singleton array containing the value provided.
5
6
  * If value is already an array, it is returned as is.
@@ -17,6 +18,5 @@ import isNotArray from './isNotArray';
17
18
  * RA.ensureArray(42); //=> [42]
18
19
  * RA.ensureArray([42]); //=> [42]
19
20
  */
20
-
21
21
  var ensureArray = when(isNotArray, of);
22
22
  export default ensureArray;
@@ -1,5 +1,6 @@
1
1
  import { when, replace } from 'ramda';
2
2
  import isString from './isString';
3
+
3
4
  /**
4
5
  * Escapes the RegExp special characters.
5
6
  *
@@ -15,6 +16,5 @@ import isString from './isString';
15
16
  *
16
17
  * RA.escapeRegExp('[ramda-adjunct](https://github.com/char0n/ramda-adjunct)'); //=> '\[ramda\-adjunct\]\(https://github\.com/char0n/ramda\-adjunct\)'
17
18
  */
18
-
19
19
  var escapeRegExp = when(isString, replace(/[.*+?^${}()|[\]\\-]/g, '\\$&'));
20
20
  export default escapeRegExp;