rubico 2.7.2 → 2.7.4

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 (495) hide show
  1. package/README.md +14 -17
  2. package/Transducer.d.ts +10 -10
  3. package/Transducer.js +65 -69
  4. package/__.js +1 -1
  5. package/_internal/FlatMappingIterator.js +1 -1
  6. package/_internal/MappingIterator.d.ts +1 -1
  7. package/_internal/MappingIterator.js +1 -1
  8. package/_internal/arrayFilter.js +6 -6
  9. package/_internal/arrayFilterIndexes.js +7 -7
  10. package/_internal/arrayFilterWithIndex.js +6 -6
  11. package/_internal/arrayFind.js +7 -7
  12. package/_internal/arrayFlatten.js +25 -25
  13. package/_internal/arrayForEach.d.ts +1 -1
  14. package/_internal/arrayForEach.js +1 -1
  15. package/_internal/arrayForEachSeries.js +1 -1
  16. package/_internal/arrayMap.d.ts +2 -2
  17. package/_internal/arrayMap.js +5 -5
  18. package/_internal/arrayMapPool.d.ts +1 -1
  19. package/_internal/arrayMapPool.js +10 -10
  20. package/_internal/arrayMapRate.js +4 -4
  21. package/_internal/arrayMapSeries.d.ts +1 -1
  22. package/_internal/arrayMapSeries.js +8 -8
  23. package/_internal/arrayMapWithIndex.js +4 -4
  24. package/_internal/arrayReduce.js +1 -1
  25. package/_internal/asyncGeneratorFunctionForEach.js +3 -3
  26. package/_internal/asyncGeneratorFunctionMap.js +3 -3
  27. package/_internal/asyncIteratorFind.js +3 -3
  28. package/_internal/asyncIteratorForEach.d.ts +1 -1
  29. package/_internal/asyncIteratorForEach.js +3 -3
  30. package/_internal/asyncIteratorForEachSeries.js +3 -3
  31. package/_internal/asyncIteratorToArray.js +2 -2
  32. package/_internal/copyDeep.js +12 -12
  33. package/_internal/funcAll.js +3 -3
  34. package/_internal/funcAllSeries.js +6 -6
  35. package/_internal/funcObjectAll.js +4 -4
  36. package/_internal/functionArrayAll.js +3 -3
  37. package/_internal/functionArrayAllSeries.js +6 -6
  38. package/_internal/functionObjectAll.js +4 -4
  39. package/_internal/generatorFunctionForEach.js +3 -3
  40. package/_internal/generatorFunctionMap.js +3 -3
  41. package/_internal/generatorFunctionReduce.js +1 -1
  42. package/_internal/iteratorEvery.js +2 -2
  43. package/_internal/iteratorFind.js +7 -7
  44. package/_internal/iteratorForEach.d.ts +1 -1
  45. package/_internal/iteratorForEach.js +3 -3
  46. package/_internal/iteratorForEachSeries.js +1 -1
  47. package/_internal/iteratorReduce.d.ts +1 -1
  48. package/_internal/iteratorReduce.js +2 -2
  49. package/_internal/iteratorSome.js +2 -2
  50. package/_internal/mapFilter.js +4 -4
  51. package/_internal/mapMap.d.ts +1 -1
  52. package/_internal/mapMap.js +6 -6
  53. package/_internal/mapMapPool.js +10 -10
  54. package/_internal/mapMapSeries.js +10 -10
  55. package/_internal/objectFilter.js +6 -6
  56. package/_internal/objectFlatMap.d.ts +1 -1
  57. package/_internal/objectFlatMap.js +1 -1
  58. package/_internal/objectFlatten.js +14 -14
  59. package/_internal/objectMap.js +3 -3
  60. package/_internal/objectMapOwn.js +3 -3
  61. package/_internal/objectMapPool.js +10 -10
  62. package/_internal/objectMapSeries.js +9 -9
  63. package/_internal/objectReduce.d.ts +1 -1
  64. package/_internal/objectReduce.js +2 -2
  65. package/_internal/reducerAllSync.d.ts +2 -2
  66. package/_internal/reducerAllSync.js +2 -2
  67. package/_internal/reducerAnySync.d.ts +1 -1
  68. package/_internal/reducerAnySync.js +2 -2
  69. package/_internal/reducerConcat.d.ts +1 -1
  70. package/_internal/reducerConcat.js +4 -4
  71. package/_internal/reducerConcatSync.js +2 -2
  72. package/_internal/reducerEvery.d.ts +2 -2
  73. package/_internal/reducerEvery.js +4 -4
  74. package/_internal/reducerFilter.d.ts +2 -2
  75. package/_internal/reducerFilter.js +5 -5
  76. package/_internal/reducerFlatten.js +3 -3
  77. package/_internal/reducerForEach.d.ts +2 -2
  78. package/_internal/reducerForEach.js +5 -5
  79. package/_internal/reducerMap.d.ts +1 -1
  80. package/_internal/reducerMap.js +5 -5
  81. package/_internal/reducerSome.d.ts +2 -2
  82. package/_internal/reducerSome.js +4 -4
  83. package/_internal/reducerTryCatch.d.ts +2 -2
  84. package/_internal/reducerTryCatch.js +8 -8
  85. package/_internal/setFilter.d.ts +1 -1
  86. package/_internal/setFilter.js +5 -5
  87. package/_internal/setFlatten.js +24 -24
  88. package/_internal/setMap.d.ts +1 -1
  89. package/_internal/setMap.js +6 -6
  90. package/_internal/setMapPool.js +9 -9
  91. package/_internal/setMapSeries.js +10 -10
  92. package/_internal/streamFlatExtend.js +25 -25
  93. package/_internal/streamFlatMap.js +2 -2
  94. package/all.js +29 -30
  95. package/and.js +27 -13
  96. package/assign.js +15 -23
  97. package/compose.js +7 -5
  98. package/curry.js +5 -12
  99. package/dist/Transducer.es.js +24 -24
  100. package/dist/Transducer.es.min.js +1 -1
  101. package/dist/Transducer.js +24 -24
  102. package/dist/Transducer.min.js +1 -1
  103. package/dist/Transducer.mjs +24 -24
  104. package/dist/__.es.js +1 -1
  105. package/dist/__.es.min.js +1 -1
  106. package/dist/__.js +1 -1
  107. package/dist/__.min.js +1 -1
  108. package/dist/__.mjs +1 -1
  109. package/dist/all.es.js +14 -14
  110. package/dist/all.es.min.js +1 -1
  111. package/dist/all.js +14 -14
  112. package/dist/all.min.js +1 -1
  113. package/dist/all.mjs +14 -14
  114. package/dist/always.es.js +1 -1
  115. package/dist/always.es.min.js +1 -1
  116. package/dist/always.js +1 -1
  117. package/dist/always.min.js +1 -1
  118. package/dist/always.mjs +1 -1
  119. package/dist/and.es.js +1 -1
  120. package/dist/and.es.min.js +1 -1
  121. package/dist/and.js +1 -1
  122. package/dist/and.min.js +1 -1
  123. package/dist/and.mjs +1 -1
  124. package/dist/assign.es.js +5 -5
  125. package/dist/assign.es.min.js +1 -1
  126. package/dist/assign.js +5 -5
  127. package/dist/assign.min.js +1 -1
  128. package/dist/assign.mjs +5 -5
  129. package/dist/compose.es.js +1 -1
  130. package/dist/compose.es.min.js +1 -1
  131. package/dist/compose.js +1 -1
  132. package/dist/compose.min.js +1 -1
  133. package/dist/compose.mjs +1 -1
  134. package/dist/curry.es.js +1 -1
  135. package/dist/curry.es.min.js +1 -1
  136. package/dist/curry.js +1 -1
  137. package/dist/curry.min.js +1 -1
  138. package/dist/curry.mjs +1 -1
  139. package/dist/eq.es.js +1 -1
  140. package/dist/eq.es.min.js +1 -1
  141. package/dist/eq.js +1 -1
  142. package/dist/eq.min.js +1 -1
  143. package/dist/eq.mjs +1 -1
  144. package/dist/every.es.js +7 -7
  145. package/dist/every.es.min.js +1 -1
  146. package/dist/every.js +7 -7
  147. package/dist/every.min.js +1 -1
  148. package/dist/every.mjs +7 -7
  149. package/dist/filter.es.js +21 -21
  150. package/dist/filter.es.min.js +1 -1
  151. package/dist/filter.js +21 -21
  152. package/dist/filter.min.js +1 -1
  153. package/dist/filter.mjs +21 -21
  154. package/dist/flatMap.es.js +82 -82
  155. package/dist/flatMap.es.min.js +1 -1
  156. package/dist/flatMap.js +82 -82
  157. package/dist/flatMap.min.js +1 -1
  158. package/dist/flatMap.mjs +82 -82
  159. package/dist/forEach.es.js +7 -7
  160. package/dist/forEach.es.min.js +1 -1
  161. package/dist/forEach.js +7 -7
  162. package/dist/forEach.min.js +1 -1
  163. package/dist/forEach.mjs +7 -7
  164. package/dist/get.es.js +1 -1
  165. package/dist/get.es.min.js +1 -1
  166. package/dist/get.js +1 -1
  167. package/dist/get.min.js +1 -1
  168. package/dist/get.mjs +1 -1
  169. package/dist/gt.es.js +1 -1
  170. package/dist/gt.es.min.js +1 -1
  171. package/dist/gt.js +1 -1
  172. package/dist/gt.min.js +1 -1
  173. package/dist/gt.mjs +1 -1
  174. package/dist/gte.es.js +1 -1
  175. package/dist/gte.es.min.js +1 -1
  176. package/dist/gte.js +1 -1
  177. package/dist/gte.min.js +1 -1
  178. package/dist/gte.mjs +1 -1
  179. package/dist/lt.es.js +1 -1
  180. package/dist/lt.es.min.js +1 -1
  181. package/dist/lt.js +1 -1
  182. package/dist/lt.min.js +1 -1
  183. package/dist/lt.mjs +1 -1
  184. package/dist/lte.es.js +1 -1
  185. package/dist/lte.es.min.js +1 -1
  186. package/dist/lte.js +1 -1
  187. package/dist/lte.min.js +1 -1
  188. package/dist/lte.mjs +1 -1
  189. package/dist/map.es.js +83 -83
  190. package/dist/map.es.min.js +1 -1
  191. package/dist/map.js +83 -83
  192. package/dist/map.min.js +1 -1
  193. package/dist/map.mjs +83 -83
  194. package/dist/not.es.js +4 -2
  195. package/dist/not.es.min.js +2 -2
  196. package/dist/not.js +4 -2
  197. package/dist/not.min.js +2 -2
  198. package/dist/not.mjs +4 -2
  199. package/dist/omit.es.js +13 -13
  200. package/dist/omit.es.min.js +1 -1
  201. package/dist/omit.js +13 -13
  202. package/dist/omit.min.js +1 -1
  203. package/dist/omit.mjs +13 -13
  204. package/dist/or.es.js +1 -1
  205. package/dist/or.es.min.js +1 -1
  206. package/dist/or.js +1 -1
  207. package/dist/or.min.js +1 -1
  208. package/dist/or.mjs +1 -1
  209. package/dist/pick.es.js +1 -1
  210. package/dist/pick.es.min.js +1 -1
  211. package/dist/pick.js +1 -1
  212. package/dist/pick.min.js +1 -1
  213. package/dist/pick.mjs +1 -1
  214. package/dist/pipe.es.js +1 -1
  215. package/dist/pipe.es.min.js +1 -1
  216. package/dist/pipe.js +1 -1
  217. package/dist/pipe.min.js +1 -1
  218. package/dist/pipe.mjs +1 -1
  219. package/dist/reduce.es.js +5 -5
  220. package/dist/reduce.es.min.js +1 -1
  221. package/dist/reduce.js +5 -5
  222. package/dist/reduce.min.js +1 -1
  223. package/dist/reduce.mjs +5 -5
  224. package/dist/rubico.es.js +218 -216
  225. package/dist/rubico.es.min.js +2 -2
  226. package/dist/rubico.global.js +218 -216
  227. package/dist/rubico.global.min.js +2 -2
  228. package/dist/rubico.js +218 -216
  229. package/dist/rubico.min.js +2 -2
  230. package/dist/rubico.mjs +218 -216
  231. package/dist/set.es.js +1 -1
  232. package/dist/set.es.min.js +1 -1
  233. package/dist/set.js +1 -1
  234. package/dist/set.min.js +1 -1
  235. package/dist/set.mjs +1 -1
  236. package/dist/some.es.js +8 -8
  237. package/dist/some.es.min.js +1 -1
  238. package/dist/some.js +8 -8
  239. package/dist/some.min.js +1 -1
  240. package/dist/some.mjs +8 -8
  241. package/dist/switchCase.es.js +1 -1
  242. package/dist/switchCase.es.min.js +1 -1
  243. package/dist/switchCase.js +1 -1
  244. package/dist/switchCase.min.js +1 -1
  245. package/dist/switchCase.mjs +1 -1
  246. package/dist/tap.es.js +1 -1
  247. package/dist/tap.es.min.js +1 -1
  248. package/dist/tap.js +1 -1
  249. package/dist/tap.min.js +1 -1
  250. package/dist/tap.mjs +1 -1
  251. package/dist/thunkify.es.js +1 -1
  252. package/dist/thunkify.es.min.js +1 -1
  253. package/dist/thunkify.js +1 -1
  254. package/dist/thunkify.min.js +1 -1
  255. package/dist/thunkify.mjs +1 -1
  256. package/dist/transform.es.js +5 -5
  257. package/dist/transform.es.min.js +1 -1
  258. package/dist/transform.js +5 -5
  259. package/dist/transform.min.js +1 -1
  260. package/dist/transform.mjs +5 -5
  261. package/dist/tryCatch.es.js +1 -1
  262. package/dist/tryCatch.es.min.js +1 -1
  263. package/dist/tryCatch.js +1 -1
  264. package/dist/tryCatch.min.js +1 -1
  265. package/dist/tryCatch.mjs +1 -1
  266. package/dist/x/append.es.js +8 -8
  267. package/dist/x/append.es.min.js +1 -1
  268. package/dist/x/append.js +8 -8
  269. package/dist/x/append.min.js +1 -1
  270. package/dist/x/append.mjs +8 -8
  271. package/dist/x/callProp.es.js +1 -1
  272. package/dist/x/callProp.es.min.js +1 -1
  273. package/dist/x/callProp.js +1 -1
  274. package/dist/x/callProp.min.js +1 -1
  275. package/dist/x/callProp.mjs +1 -1
  276. package/dist/x/defaultsDeep.es.js +69 -37
  277. package/dist/x/defaultsDeep.es.min.js +2 -2
  278. package/dist/x/defaultsDeep.js +69 -37
  279. package/dist/x/defaultsDeep.min.js +2 -2
  280. package/dist/x/defaultsDeep.mjs +69 -37
  281. package/dist/x/differenceWith.es.js +14 -14
  282. package/dist/x/differenceWith.es.min.js +1 -1
  283. package/dist/x/differenceWith.js +14 -14
  284. package/dist/x/differenceWith.min.js +1 -1
  285. package/dist/x/differenceWith.mjs +14 -14
  286. package/dist/x/filterOut.es.js +24 -22
  287. package/dist/x/filterOut.es.min.js +2 -2
  288. package/dist/x/filterOut.js +24 -22
  289. package/dist/x/filterOut.min.js +2 -2
  290. package/dist/x/filterOut.mjs +24 -22
  291. package/dist/x/find.es.js +18 -18
  292. package/dist/x/find.es.min.js +1 -1
  293. package/dist/x/find.js +18 -18
  294. package/dist/x/find.min.js +1 -1
  295. package/dist/x/find.mjs +18 -18
  296. package/dist/x/findIndex.es.js +1 -1
  297. package/dist/x/findIndex.es.min.js +1 -1
  298. package/dist/x/findIndex.js +1 -1
  299. package/dist/x/findIndex.min.js +1 -1
  300. package/dist/x/findIndex.mjs +1 -1
  301. package/dist/x/first.es.js +1 -1
  302. package/dist/x/first.es.min.js +1 -1
  303. package/dist/x/first.js +1 -1
  304. package/dist/x/first.min.js +1 -1
  305. package/dist/x/first.mjs +1 -1
  306. package/dist/x/flatten.es.js +82 -82
  307. package/dist/x/flatten.es.min.js +1 -1
  308. package/dist/x/flatten.js +82 -82
  309. package/dist/x/flatten.min.js +1 -1
  310. package/dist/x/flatten.mjs +82 -82
  311. package/dist/x/groupBy.es.js +17 -17
  312. package/dist/x/groupBy.es.min.js +1 -1
  313. package/dist/x/groupBy.js +17 -17
  314. package/dist/x/groupBy.min.js +1 -1
  315. package/dist/x/groupBy.mjs +17 -17
  316. package/dist/x/has.es.js +1 -1
  317. package/dist/x/has.es.min.js +1 -1
  318. package/dist/x/has.js +1 -1
  319. package/dist/x/has.min.js +1 -1
  320. package/dist/x/has.mjs +1 -1
  321. package/dist/x/identity.es.js +1 -1
  322. package/dist/x/identity.es.min.js +1 -1
  323. package/dist/x/identity.js +1 -1
  324. package/dist/x/identity.min.js +1 -1
  325. package/dist/x/identity.mjs +1 -1
  326. package/dist/x/includes.es.js +1 -1
  327. package/dist/x/includes.es.min.js +1 -1
  328. package/dist/x/includes.js +1 -1
  329. package/dist/x/includes.min.js +1 -1
  330. package/dist/x/includes.mjs +1 -1
  331. package/dist/x/isDeepEqual.es.js +1 -1
  332. package/dist/x/isDeepEqual.es.min.js +1 -1
  333. package/dist/x/isDeepEqual.js +1 -1
  334. package/dist/x/isDeepEqual.min.js +1 -1
  335. package/dist/x/isDeepEqual.mjs +1 -1
  336. package/dist/x/isEmpty.es.js +1 -1
  337. package/dist/x/isEmpty.es.min.js +1 -1
  338. package/dist/x/isEmpty.js +1 -1
  339. package/dist/x/isEmpty.min.js +1 -1
  340. package/dist/x/isEmpty.mjs +1 -1
  341. package/dist/x/isEqual.es.js +1 -1
  342. package/dist/x/isEqual.es.min.js +1 -1
  343. package/dist/x/isEqual.js +1 -1
  344. package/dist/x/isEqual.min.js +1 -1
  345. package/dist/x/isEqual.mjs +1 -1
  346. package/dist/x/isFunction.es.js +1 -1
  347. package/dist/x/isFunction.es.min.js +1 -1
  348. package/dist/x/isFunction.js +1 -1
  349. package/dist/x/isFunction.min.js +1 -1
  350. package/dist/x/isFunction.mjs +1 -1
  351. package/dist/x/isIn.es.js +1 -1
  352. package/dist/x/isIn.es.min.js +1 -1
  353. package/dist/x/isIn.js +1 -1
  354. package/dist/x/isIn.min.js +1 -1
  355. package/dist/x/isIn.mjs +1 -1
  356. package/dist/x/isObject.es.js +1 -1
  357. package/dist/x/isObject.es.min.js +1 -1
  358. package/dist/x/isObject.js +1 -1
  359. package/dist/x/isObject.min.js +1 -1
  360. package/dist/x/isObject.mjs +1 -1
  361. package/dist/x/isString.es.js +1 -1
  362. package/dist/x/isString.es.min.js +1 -1
  363. package/dist/x/isString.js +1 -1
  364. package/dist/x/isString.min.js +1 -1
  365. package/dist/x/isString.mjs +1 -1
  366. package/dist/x/keys.es.js +1 -1
  367. package/dist/x/keys.es.min.js +1 -1
  368. package/dist/x/keys.js +1 -1
  369. package/dist/x/keys.min.js +1 -1
  370. package/dist/x/keys.mjs +1 -1
  371. package/dist/x/last.es.js +1 -1
  372. package/dist/x/last.es.min.js +1 -1
  373. package/dist/x/last.js +1 -1
  374. package/dist/x/last.min.js +1 -1
  375. package/dist/x/last.mjs +1 -1
  376. package/dist/x/maxBy.es.js +6 -6
  377. package/dist/x/maxBy.es.min.js +1 -1
  378. package/dist/x/maxBy.js +6 -6
  379. package/dist/x/maxBy.min.js +1 -1
  380. package/dist/x/maxBy.mjs +6 -6
  381. package/dist/x/noop.es.js +1 -1
  382. package/dist/x/noop.es.min.js +1 -1
  383. package/dist/x/noop.js +1 -1
  384. package/dist/x/noop.min.js +1 -1
  385. package/dist/x/noop.mjs +1 -1
  386. package/dist/x/pluck.es.js +83 -83
  387. package/dist/x/pluck.es.min.js +1 -1
  388. package/dist/x/pluck.js +83 -83
  389. package/dist/x/pluck.min.js +1 -1
  390. package/dist/x/pluck.mjs +83 -83
  391. package/dist/x/prepend.es.js +8 -8
  392. package/dist/x/prepend.es.min.js +1 -1
  393. package/dist/x/prepend.js +8 -8
  394. package/dist/x/prepend.min.js +1 -1
  395. package/dist/x/prepend.mjs +8 -8
  396. package/dist/x/size.es.js +1 -1
  397. package/dist/x/size.es.min.js +1 -1
  398. package/dist/x/size.js +1 -1
  399. package/dist/x/size.min.js +1 -1
  400. package/dist/x/size.mjs +1 -1
  401. package/dist/x/trace.es.js +1 -1
  402. package/dist/x/trace.es.min.js +1 -1
  403. package/dist/x/trace.js +1 -1
  404. package/dist/x/trace.min.js +1 -1
  405. package/dist/x/trace.mjs +1 -1
  406. package/dist/x/unionWith.es.js +39 -39
  407. package/dist/x/unionWith.es.min.js +1 -1
  408. package/dist/x/unionWith.js +39 -39
  409. package/dist/x/unionWith.min.js +1 -1
  410. package/dist/x/unionWith.mjs +39 -39
  411. package/dist/x/uniq.es.js +1 -1
  412. package/dist/x/uniq.es.min.js +1 -1
  413. package/dist/x/uniq.js +1 -1
  414. package/dist/x/uniq.min.js +1 -1
  415. package/dist/x/uniq.mjs +1 -1
  416. package/dist/x/unless.es.js +1 -1
  417. package/dist/x/unless.es.min.js +1 -1
  418. package/dist/x/unless.js +1 -1
  419. package/dist/x/unless.min.js +1 -1
  420. package/dist/x/unless.mjs +1 -1
  421. package/dist/x/values.es.js +1 -1
  422. package/dist/x/values.es.min.js +1 -1
  423. package/dist/x/values.js +1 -1
  424. package/dist/x/values.min.js +1 -1
  425. package/dist/x/values.mjs +1 -1
  426. package/dist/x/when.es.js +1 -1
  427. package/dist/x/when.es.min.js +1 -1
  428. package/dist/x/when.js +1 -1
  429. package/dist/x/when.min.js +1 -1
  430. package/dist/x/when.mjs +1 -1
  431. package/eq.js +32 -10
  432. package/es.js +218 -216
  433. package/every.d.ts +1 -1
  434. package/every.js +5 -3
  435. package/filter.d.ts +3 -3
  436. package/filter.js +15 -15
  437. package/flatMap.d.ts +9 -9
  438. package/flatMap.js +13 -11
  439. package/forEach.d.ts +1 -1
  440. package/forEach.js +19 -15
  441. package/gt.js +30 -13
  442. package/gte.js +31 -12
  443. package/index.js +218 -216
  444. package/lt.js +28 -9
  445. package/lte.js +34 -15
  446. package/map.d.ts +3 -3
  447. package/map.js +32 -32
  448. package/monad/Mux.benchmark.js +1 -1
  449. package/monad/Mux.js +6 -6
  450. package/monad/Struct.js +2 -2
  451. package/not.js +23 -8
  452. package/omit.js +2 -3
  453. package/or.js +30 -14
  454. package/package.json +1 -1
  455. package/pick.js +2 -3
  456. package/pipe.js +7 -15
  457. package/reduce.d.ts +7 -7
  458. package/reduce.js +19 -24
  459. package/some.d.ts +1 -1
  460. package/some.js +5 -3
  461. package/switchCase.d.ts +1 -1
  462. package/switchCase.js +13 -12
  463. package/tap.js +20 -4
  464. package/thunkify.js +2 -0
  465. package/transform.d.ts +1 -1
  466. package/transform.js +9 -23
  467. package/tryCatch.js +41 -8
  468. package/x/README.md +8 -8
  469. package/x/append.d.ts +2 -2
  470. package/x/append.js +8 -8
  471. package/x/defaultsDeep.js +94 -57
  472. package/x/defaultsDeep.test.js +24 -1
  473. package/x/differenceWith.js +13 -13
  474. package/x/find.d.ts +1 -1
  475. package/x/find.js +1 -1
  476. package/x/find.test.js +2 -2
  477. package/x/findIndex.test.js +1 -1
  478. package/x/first.d.ts +1 -1
  479. package/x/first.js +1 -1
  480. package/x/first.test.js +1 -1
  481. package/x/groupBy.d.ts +1 -1
  482. package/x/groupBy.js +13 -13
  483. package/x/last.d.ts +1 -1
  484. package/x/last.js +1 -1
  485. package/x/last.test.js +1 -1
  486. package/x/maxBy.d.ts +7 -7
  487. package/x/maxBy.js +13 -13
  488. package/x/maxBy.test.js +5 -5
  489. package/x/pluck.test.js +1 -1
  490. package/x/prepend.d.ts +2 -2
  491. package/x/prepend.js +8 -8
  492. package/x/size.d.ts +1 -1
  493. package/x/size.js +1 -1
  494. package/x/unionWith.js +11 -11
  495. package/x/unionWith.test.js +5 -5
package/reduce.d.ts CHANGED
@@ -28,7 +28,7 @@ export = reduce;
28
28
  * ```
29
29
  *
30
30
  * @description
31
- * Transforms a collection based on a reducer function and optional initial value. In a reducing operation, the result is defined in the beginning as either the initial value if supplied or the first item of the collection. The reducing operation then iterates through the remaining items in the collection, executing the reducer at each iteration to return the result to be used in the next iteration. The final result is the result of the execution of the reducer at the last item of the iteration. `reduce` accepts the following collections:
31
+ * Transforms a collection based on a reducer function and optional initial value. In a reducing operation, the result is defined in the beginning as either the initial value if supplied or the first element of the collection. The reducing operation then iterates through the remaining elements in the collection, executing the reducer at each iteration to return the result to be used in the next iteration. The final result is the result of the execution of the reducer at the last element of the iteration. `reduce` accepts the following collections:
32
32
  *
33
33
  * * `Array`
34
34
  * * `Object`
@@ -37,7 +37,7 @@ export = reduce;
37
37
  * * `Iterator`/`Generator`
38
38
  * * `AsyncIterator`/`AsyncGenerator`
39
39
  *
40
- * For arrays (type `Array`), `reduce` executes the reducer function for each item of the array in order, returning a new result at each execution to be used in the next execution. On each iteration, the reducer is passed the accumulator, the item of the iteration, the index of the item in the array, and a reference to the original array.
40
+ * For arrays (type `Array`), `reduce` executes the reducer function for each element of the array in order, returning a new result at each execution to be used in the next execution. On each iteration, the reducer is passed the accumulator, the element of the iteration, the index of the element in the array, and a reference to the original array.
41
41
  *
42
42
  * ```javascript [playground]
43
43
  * const max = (a, b) => a > b ? a : b
@@ -51,7 +51,7 @@ export = reduce;
51
51
  * ) // 5
52
52
  * ```
53
53
  *
54
- * If an optional initial value is provided, the result starts as the provided initial value rather than the first item of the collection.
54
+ * If an optional initial value is provided, the result starts as the provided initial value rather than the first element of the collection.
55
55
  *
56
56
  * ```javascript [playground]
57
57
  * const add = (a, b) => a + b
@@ -91,7 +91,7 @@ export = reduce;
91
91
  * ) // 15
92
92
  * ```
93
93
  *
94
- * For sets (type `Set`), `reduce` executes the reducer function for each item of the set. On each iteration, the reducer is passed the accumulator and item of the set.
94
+ * For sets (type `Set`), `reduce` executes the reducer function for each element of the set. On each iteration, the reducer is passed the accumulator and element of the set.
95
95
  *
96
96
  * ```javascript [playground]
97
97
  * const add = (a, b) => a + b
@@ -107,7 +107,7 @@ export = reduce;
107
107
  * ) // 15
108
108
  * ```
109
109
  *
110
- * For maps (type `Map`), `reduce` executes the reducer function for each value of each entry of the map. On each iteration, the reducer is passed the accumulator, the map item, the key of the map item, and a reference to the original map.
110
+ * For maps (type `Map`), `reduce` executes the reducer function for each value of each entry of the map. On each iteration, the reducer is passed the accumulator, the map element, the key of the map element, and a reference to the original map.
111
111
  *
112
112
  * ```javascript [playground]
113
113
  * const add = (a, b) => a + b
@@ -123,7 +123,7 @@ export = reduce;
123
123
  * ) // 15
124
124
  * ```
125
125
  *
126
- * For iterators (type `Iterator`) and generators (type `Generator`), `reduce` executes the reducer function for each value of the iterator/generator. On each iteration, the reducer is passed the accumulator and the item of the iteration. The iterator/generator is consumed in the process.
126
+ * For iterators (type `Iterator`) and generators (type `Generator`), `reduce` executes the reducer function for each value of the iterator/generator. On each iteration, the reducer is passed the accumulator and the element of the iteration. The iterator/generator is consumed in the process.
127
127
  *
128
128
  * ```javascript [playground]
129
129
  * const add = (a, b) => a + b
@@ -141,7 +141,7 @@ export = reduce;
141
141
  * ) // 15
142
142
  * ```
143
143
  *
144
- * For asyncIterators (type `AsyncIterator`) and asyncGenerators (type `AsyncGenerator`), `reduce` executes the reducer function for each value of the asyncIterator/asyncGenerator. On each iteration, the reducer is passed the accumulator and the item of the async iteration. The asyncIterator/asyncGenerator is consumed in the process.
144
+ * For asyncIterators (type `AsyncIterator`) and asyncGenerators (type `AsyncGenerator`), `reduce` executes the reducer function for each value of the asyncIterator/asyncGenerator. On each iteration, the reducer is passed the accumulator and the element of the async iteration. The asyncIterator/asyncGenerator is consumed in the process.
145
145
  *
146
146
  * ```javascript [playground]
147
147
  * const asyncAdd = async (a, b) => a + b
package/reduce.js CHANGED
@@ -23,25 +23,20 @@ const _reduce = function (collection, reducer, initial) {
23
23
  * ```coffeescript [specscript]
24
24
  * type Foldable = Array|Set|Map|Generator|AsyncGenerator|{ reduce: function }|Object
25
25
  *
26
- * type Reducer = (
26
+ * type SyncOrAsyncReducer = (
27
27
  * accumulator any,
28
- * item any,
28
+ * element any,
29
29
  * indexOrKey number|string|any,
30
- * fold Foldable
30
+ * foldable Foldable
31
31
  * )=>(nextAccumulator Promise|any)
32
32
  *
33
- * type Resolver = (fold Foldable)=>Promise|any
33
+ * type UnarySyncOrAsyncResolver = any=>Promise|any
34
34
  *
35
- * reduce(
36
- * fold Foldable,
37
- * reducer Reducer,
38
- * initial? Resolver|any
39
- * ) -> result Promise|any
35
+ * reducer SyncOrAsyncReducer
36
+ * initial UnarySyncOrAsyncResolver|any
40
37
  *
41
- * reduce(
42
- * reducer Reducer,
43
- * initial? Resolver|any
44
- * )(fold Foldable) -> result Promise|any
38
+ * reduce(foldable Promise|Foldable, reducer, initial?) -> result Promise|any
39
+ * reduce(reducer, initial?)(foldable Foldable) -> result Promise|any
45
40
  * ```
46
41
  *
47
42
  * @description
@@ -56,11 +51,11 @@ const _reduce = function (collection, reducer, initial) {
56
51
  * * `object with .reduce method`
57
52
  * * `object`
58
53
  *
59
- * The reducing operation is dictated by a provided reducer function, which defines a transformation between the accumulator and a given item of the foldable.
54
+ * The reducing operation is dictated by a provided reducer function, which defines a transformation between the accumulator and a given element of the foldable.
60
55
  *
61
56
  * ```javascript
62
- * const reducer = function (accumulator, item) {
63
- * // nextAccumulator is the result of some operation between accumulator and item
57
+ * const reducer = function (accumulator, element) {
58
+ * // nextAccumulator is the result of some operation between accumulator and element
64
59
  * // and becomes the accumulator for the next iteration and invocation of the reducer
65
60
  * return nextAccumulator
66
61
  * }
@@ -72,7 +67,7 @@ const _reduce = function (collection, reducer, initial) {
72
67
  * ```coffeescript [specscript]
73
68
  * reducer(
74
69
  * accumulator any,
75
- * item any,
70
+ * element any,
76
71
  * index number,
77
72
  * fold Array
78
73
  * ) -> nextAccumulator Promise|any
@@ -82,7 +77,7 @@ const _reduce = function (collection, reducer, initial) {
82
77
  * ```coffeescript [specscript]
83
78
  * reducer(
84
79
  * accumulator any,
85
- * item any
80
+ * element any
86
81
  * ) -> nextAccumulator Promise|any
87
82
  * ```
88
83
  *
@@ -90,7 +85,7 @@ const _reduce = function (collection, reducer, initial) {
90
85
  * ```coffeescript [specscript]
91
86
  * reducer(
92
87
  * accumulator any,
93
- * item any,
88
+ * element any,
94
89
  * key any,
95
90
  * fold Map
96
91
  * ) -> nextAccumulator Promise|any
@@ -100,7 +95,7 @@ const _reduce = function (collection, reducer, initial) {
100
95
  * ```coffeescript [specscript]
101
96
  * reducer(
102
97
  * accumulator any,
103
- * item any
98
+ * element any
104
99
  * ) -> nextAccumulator Promise|any
105
100
  * ```
106
101
  *
@@ -108,7 +103,7 @@ const _reduce = function (collection, reducer, initial) {
108
103
  * ```coffeescript [specscript]
109
104
  * reducer(
110
105
  * accumulator any,
111
- * item any
106
+ * element any
112
107
  * ) -> nextAccumulator Promise|any
113
108
  * ```
114
109
  *
@@ -118,13 +113,13 @@ const _reduce = function (collection, reducer, initial) {
118
113
  * ```coffeescript [specscript]
119
114
  * reducer(
120
115
  * accumulator any,
121
- * item any,
116
+ * element any,
122
117
  * key string,
123
118
  * fold Object
124
119
  * ) -> nextAccumulator Promise|any
125
120
  * ```
126
121
  *
127
- * `reduce` executes a reducer function for each item of the array in order. If no initial value is provided, `reduce` uses the first item of the foldable as the initial value and starts iterating from the second item of the foldable.
122
+ * `reduce` executes a reducer function for each element of the array in order. If no initial value is provided, `reduce` uses the first element of the foldable as the initial value and starts iterating from the second element of the foldable.
128
123
  *
129
124
  * ```javascript [playground]
130
125
  * const max = (a, b) => a > b ? a : b
@@ -133,7 +128,7 @@ const _reduce = function (collection, reducer, initial) {
133
128
  * console.log(result) // 5
134
129
  * ```
135
130
  *
136
- * If an initial value is provided, the accumulator starts as the initial value rather than the first item of the foldable.
131
+ * If an initial value is provided, the accumulator starts as the initial value rather than the first element of the foldable.
137
132
  *
138
133
  * ```javascript [playground]
139
134
  * const add = (a, b) => a + b
package/some.d.ts CHANGED
@@ -12,7 +12,7 @@ export = some;
12
12
  * ```
13
13
  *
14
14
  * @description
15
- * Test a predicate concurrently across all items of a collection, returning true if any executions return truthy.
15
+ * Test a predicate concurrently across all elements of a collection, returning true if any executions return truthy.
16
16
  *
17
17
  * ```javascript [playground]
18
18
  * const isOdd = number => number % 2 == 1
package/some.js CHANGED
@@ -41,14 +41,16 @@ const _some = function (collection, predicate) {
41
41
  * @synopsis
42
42
  * ```coffeescript [specscript]
43
43
  * type Foldable = Array|Set|Map|Generator|AsyncGenerator|{ reduce: function }|Object
44
+ * type UnarySyncOrAsyncPredicate = any=>Promise|boolean
44
45
  *
45
- * some(collection Foldable, predicate function) -> Promise|boolean
46
+ * predicate UnarySyncOrAsyncPredicate
46
47
  *
47
- * some(predicate function)(collection Foldable) -> Promise|boolean
48
+ * some(foldable Foldable, predicate) -> Promise|boolean
49
+ * some(predicate)(foldable Foldable) -> Promise|boolean
48
50
  * ```
49
51
  *
50
52
  * @description
51
- * Test a predicate concurrently across all items of a foldable, returning true if any executions return true.
53
+ * Test a predicate concurrently across all elements of a foldable, returning true if any executions return true.
52
54
  *
53
55
  * ```javascript [playground]
54
56
  * const isOdd = number => number % 2 == 1
package/switchCase.d.ts CHANGED
@@ -61,7 +61,7 @@ export = switchCase;
61
61
  * ])(false).then(console.log) // default
62
62
  * ```
63
63
  *
64
- * If every item in the conditional array is a nonfunction value, `switchCase` executes eagerly.
64
+ * If every element in the conditional array is a nonfunction value, `switchCase` executes eagerly.
65
65
  *
66
66
  * ```javascript [playground]
67
67
  * const age = 26
package/switchCase.js CHANGED
@@ -12,20 +12,21 @@ const curryArgs3 = require('./_internal/curryArgs3')
12
12
  *
13
13
  * @synopsis
14
14
  * ```coffeescript [specscript]
15
- * switchCase(conditionalValues Array<boolean|any>) -> Promise|any
15
+ * args Array<any>
16
+ * argsOrPromises Array<Promise|any>
16
17
  *
17
- * switchCase(
18
- * ...args,
19
- * conditionalFuncsOrValues Array<function|boolean|any>
20
- * ) -> Promise|any
18
+ * type SyncOrAsyncPredicate = (...args)=>Promise|boolean|any
21
19
  *
22
- * switchCase(
23
- * conditionalFuncsOrValues Array<function|boolean|any>
24
- * )(...args) -> Promise|any
20
+ * conditionalPromisesOrValues Array<Promise|boolean|any>
21
+ * conditionalFuncsOrPromisesOrValues Array<SyncOrAsyncPredicate|Promise|boolean|any>
22
+ *
23
+ * switchCase(conditionalPromisesOrValues) -> Promise|any
24
+ * switchCase(...argsOrPromises, conditionalFuncsOrPromisesOrValues) -> Promise|any
25
+ * switchCase(conditionalFuncsOrPromisesOrValues)(...args) -> Promise|any
25
26
  * ```
26
27
  *
27
28
  * @description
28
- * Functional equivalent to the [Conditional (ternary) operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator). Accepts an array of conditional functions that specifies cases as pairings of `predicate` and `resolver` functions with the exception of the last, default resolver. All functions are provided with the same arguments and executed in series. The result of a `switchCase` operation is either the result of the execution the last default resolver, or the result of the execution of the first resolver where the associated predicate tested true.
29
+ * Function equivalent to the [Conditional (ternary) operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator). Accepts an array of conditional functions that specifies cases as pairings of `predicate` and `resolver` functions with the exception of the last, default resolver. All functions are provided with the same arguments and executed in series. The result of a `switchCase` operation is either the result of the execution the last default resolver, or the result of the execution of the first resolver where the associated predicate tested true.
29
30
  *
30
31
  * ```javascript [playground]
31
32
  * const fruitIsYellow = fruit => fruit.color == 'yellow'
@@ -60,16 +61,16 @@ const curryArgs3 = require('./_internal/curryArgs3')
60
61
  * Any function can be replaced with a nonfunction (object or primitive) value to be used directly in the operation.
61
62
  *
62
63
  * ```javascript [playground]
63
- * switchCase([
64
+ * switchCase(false, [
64
65
  * async function asyncIdentity(value) {
65
66
  * return value
66
67
  * },
67
68
  * 'something',
68
69
  * 'default',
69
- * ])(false).then(console.log) // default
70
+ * ]).then(console.log) // default
70
71
  * ```
71
72
  *
72
- * If every item in the conditional array is a nonfunction value, `switchCase` executes eagerly.
73
+ * If every element in the conditional array is a nonfunction value, `switchCase` executes eagerly.
73
74
  *
74
75
  * ```javascript [playground]
75
76
  * const age = 26
package/tap.js CHANGED
@@ -22,8 +22,15 @@ const _tap = function (args, f) {
22
22
  *
23
23
  * @synopsis
24
24
  * ```coffeescript [specscript]
25
- * tap(...args, f function) -> Promise|args[0]
26
- * tap(f function)(...args) -> Promise|args[0]
25
+ * args Array<any>
26
+ * argsOrPromises Array<Promise|any>
27
+ *
28
+ * type SyncOrAsyncFunction = (...args)=>Promise|any
29
+ *
30
+ * f SyncOrAsyncFunction
31
+ *
32
+ * tap(...argsOrPromises, f) -> Promise|args[0]
33
+ * tap(f)(...args) -> Promise|args[0]
27
34
  * ```
28
35
  *
29
36
  * @description
@@ -101,8 +108,17 @@ const _tapIf = function (predicate, f, args) {
101
108
  *
102
109
  * @synopsis
103
110
  * ```coffeescript [specscript]
104
- * tap.if(...args, predicate function, f function) -> Promise|args[0]
105
- * tap.if(predicate function, f function)(...args) -> Promise|args[0]
111
+ * args Array<any>
112
+ * argsOrPromises Array<Promise|any>
113
+ *
114
+ * type SyncOrAsyncPredicate = (...args)=>Promise|boolean|any
115
+ * type SyncOrAsyncFunction = (...args)=>Promise|any
116
+ *
117
+ * predicate SyncOrAsyncPredicate
118
+ * f SyncOrAsyncFunction
119
+ *
120
+ * tap.if(...argsOrPromises, predicate, f) -> Promise|args[0]
121
+ * tap.if(predicate, f)(...args) -> Promise|args[0]
106
122
  * ```
107
123
  *
108
124
  * @description
package/thunkify.js CHANGED
@@ -9,6 +9,8 @@ const funcApply = require('./_internal/funcApply')
9
9
  *
10
10
  * @synopsis
11
11
  * ```coffeescript [specscript]
12
+ * args Array<any>
13
+ *
12
14
  * thunkify(func function, ...args) -> thunk ()=>func(...args)
13
15
  * ```
14
16
  *
package/transform.d.ts CHANGED
@@ -40,7 +40,7 @@ export = transform;
40
40
  * * `Set`; concatenation defined by `result.add(...values)`
41
41
  * * `TypedArray`; concatenation defined by `result.set(prevResult); result.set(values, offset)`
42
42
  * * `{ concat: function }`; concatenation defined by `result.concat(values)`
43
- * * `{ write: function }`; concatenation defined by `result.write(item)`
43
+ * * `{ write: function }`; concatenation defined by `result.write(element)`
44
44
  * * `Object`; concatenation defined by `({ ...result, ...values })`
45
45
  *
46
46
  * `transform` can transform any of the above collections into any of the other above collections.
package/transform.js CHANGED
@@ -22,29 +22,19 @@ const _transform = function (collection, transducer, initialValue) {
22
22
  * @synopsis
23
23
  * ```coffeescript [specscript]
24
24
  * type Foldable = Array|Set|Map|Generator|AsyncGenerator|{ reduce: function }|Object
25
- *
26
- * type Reducer = (
27
- * accumulator any,
28
- * value any,
29
- * )=>(nextAccumulator Promise|any)
30
- *
31
- * type Transducer = Reducer=>Reducer
25
+ * type SyncOrAsyncReducer = (accumulator any, value any)=>(nextAccumulator Promise|any)
26
+ * type Transducer = SyncOrAsyncReducer=>SyncOrAsyncReducer
32
27
  *
33
28
  * type Semigroup =
34
29
  * Array|String|Set|TypedArray|{ concat: function }|{ write: function }|Object
35
30
  *
36
- * type SemigroupResolver = (fold Foldable)=>Promise|Semigroup
31
+ * type UnarySyncOrAsyncSemigroupResolver = any=>Promise|Semigroup
37
32
  *
38
- * transform(
39
- * fold Foldable,
40
- * transducer Transducer,
41
- * initial? Semigroup|SemigroupResolver,
42
- * ) -> result Promise|Semigroup
33
+ * transducer Transducer
34
+ * initial UnarySyncOrAsyncSemigroupResolver|Semigroup
43
35
  *
44
- * transform(
45
- * transducer Transducer,
46
- * initial? Semigroup|SemigroupResolver,
47
- * )(fold Foldable) -> result Promise|Semigroup
36
+ * transform(foldable Promise|Foldable, transducer, initial?) -> result Promise|Semigroup
37
+ * transform(transducer, initial?)(foldable Foldable) -> result Promise|Semigroup
48
38
  * ```
49
39
  *
50
40
  * @description
@@ -62,12 +52,8 @@ const _transform = function (collection, transducer, initialValue) {
62
52
  * Transducers, due to their lazy nature, don't have knowledge of the foldable they are transforming. As such, the transducer signature for all foldables is the same:
63
53
  *
64
54
  * ```coffeescript [specscript]
65
- * type Reducer = (
66
- * accumulator any,
67
- * value any,
68
- * )=>(nextAccumulator Promise|any)
69
- *
70
- * type Transducer = Reducer=>Reducer
55
+ * type SyncOrAsyncReducer = (accumulator any, value any)=>(nextAccumulator Promise|any)
56
+ * type Transducer = SyncOrAsyncReducer=>SyncOrAsyncReducer
71
57
  * ```
72
58
  *
73
59
  * The following data types are considered to be semigroups:
package/tryCatch.js CHANGED
@@ -22,13 +22,21 @@ const _tryCatch = function (tryer, catcher, args) {
22
22
  *
23
23
  * @synopsis
24
24
  * ```coffeescript [specscript]
25
- * tryCatch(tryer function, catcher function)(...args) -> Promise|any
25
+ * args Array<any>
26
+ * argsOrPromises Array<Promise|any>
26
27
  *
27
- * tryCatch(...args, tryer function, catcher function) -> Promise|any
28
+ * type SyncOrAsyncFunction = (...args)=>Promise|any
29
+ * type SyncOrAsyncCatcher = (error Error|any, ...args)=>Promise|any
30
+ *
31
+ * tryer SyncOrAsyncFunction
32
+ * catcher SyncOrAsyncCatcher
33
+ *
34
+ * tryCatch(tryer, catcher)(...args) -> Promise|any
35
+ * tryCatch(...argsOrPromises, tryer, catcher) -> Promise|any
28
36
  * ```
29
37
  *
30
38
  * @description
31
- * Handles errors with a `tryer` and a `catcher` function. Calls the `tryer` function with the provided arguments and catches any errors thrown by the `tryer` function with the `catcher` function. If the `tryer` function is asynchronous and returns a rejected promise, the `catcher` function will execute with the value of the rejected promise. The `catcher` function is called with the error and all arguments supplied to the `tryer` function.
39
+ * Function equivalent to the [try...catch](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) statement. Accepts two functions: a `tryer` function and a `catcher` function. Calls the `tryer` function and catches any errors thrown by the `tryer` function with the `catcher` function.
32
40
  *
33
41
  * ```javascript [playground]
34
42
  * const throwsIfOdd = number => {
@@ -38,18 +46,43 @@ const _tryCatch = function (tryer, catcher, args) {
38
46
  * console.log('did not throw for', number)
39
47
  * }
40
48
  *
41
- * const errorHandler = tryCatch(throwsIfOdd, (error, number) => {
49
+ * const errorHandler = (error, number) => {
42
50
  * console.log('caught error from number', number)
43
51
  * console.log(error)
44
- * })
52
+ * }
53
+ *
54
+ * const handler = tryCatch(throwsIfOdd, errorHandler)
55
+ *
56
+ * handler(2) // did not throw for 2
57
+ * handler(3) // caught error from number 3
58
+ * // Error: 3 is odd
59
+ *
60
+ * ```
61
+ *
62
+ * If the `tryer` function is asynchronous and throws an error, the `catcher` function will catch the rejected promise.
63
+ *
64
+ * ```javascript [playground]
65
+ * const rejectsIfOdd = async number => {
66
+ * if (number % 2 == 1) {
67
+ * throw new Error(`${number} is odd`)
68
+ * }
69
+ * console.log('did not throw for', number)
70
+ * }
71
+ *
72
+ * const errorHandler = (error, number) => {
73
+ * console.log('caught error from number', number)
74
+ * console.log(error)
75
+ * }
76
+ *
77
+ * const asyncHandler = tryCatch(rejectsIfOdd, errorHandler)
45
78
  *
46
- * errorHandler(2) // did not throw for 2
47
- * errorHandler(3) // caught error from number 3
79
+ * asyncHandler(2) // did not throw for 2
80
+ * asyncHandler(3) // caught error from number 3
48
81
  * // Error: 3 is odd
49
82
  *
50
83
  * ```
51
84
  *
52
- * `tryCatch` behaves eagerly (executes immediately with a single call and not with multiple calls like a higher order function) when passed any amount of nonfunction (primitive or object) arguments before the `tryer` and `catcher` functions.
85
+ * When provided any number of arguments before the tryer and catcher functions, `tryCatch` executes immediately.
53
86
  *
54
87
  * ```javascript [playground]
55
88
  * const add = (a, b) => a + b
package/x/README.md CHANGED
@@ -46,7 +46,7 @@ defaultsDeep({
46
46
  ```
47
47
 
48
48
  ### find
49
- get the first item in a collection that passes the test
49
+ get the first element in a collection that passes the test
50
50
  ```javascript
51
51
  y = find(xi => boolean)(x)
52
52
  ```
@@ -86,20 +86,20 @@ flatten([[1], [2], [3]]), // > [1, 2, 3]
86
86
 
87
87
  `x` is a String or Array
88
88
 
89
- `y` is the last item of `x`
89
+ `y` is the last element of `x`
90
90
 
91
91
  ```javascript
92
92
  first([1,2,3]) // 1
93
93
  ```
94
94
 
95
95
  ### forEach
96
- execute a function for each item of a collection, returning input
96
+ execute a function for each element of a collection, returning input
97
97
  ```javascript
98
98
  y = forEach(f)(x)
99
99
  ```
100
100
  `f` is a function
101
101
 
102
- `f` is called for each item of `x`
102
+ `f` is called for each element of `x`
103
103
 
104
104
  `x` is an Iterable, AsyncIterable, Object, or reducer function
105
105
 
@@ -232,14 +232,14 @@ y = last(x)
232
232
 
233
233
  `x` is a String or Array
234
234
 
235
- `y` is the last item of `x`
235
+ `y` is the last element of `x`
236
236
 
237
237
  ```javascript
238
238
  last([1,2,3]) // 3
239
239
  ```
240
240
 
241
241
  ### pluck
242
- create a new collection by getting a path from every item of an old collection
242
+ create a new collection by getting a path from every element of an old collection
243
243
  ```javascript
244
244
  y = pluck(path, defaultValue)(x)
245
245
  ```
@@ -312,13 +312,13 @@ create a flattened unique array with uniques given by a binary predicate
312
312
  ```javascript
313
313
  y = unionWith((a, b) => boolean)(x)
314
314
  ```
315
- `a` and `b` are items of items of `x`
315
+ `a` and `b` are elements of elements of `x`
316
316
 
317
317
  `(a, b) => boolean` returns True if a and b are duplicates
318
318
 
319
319
  `x` is an Array of Arrays of anything
320
320
 
321
- `y` is a flattened Array of unique items of items of `x` determined by `(a, b) => boolean`
321
+ `y` is a flattened Array of unique elements of elements of `x` determined by `(a, b) => boolean`
322
322
 
323
323
  `y` is a Promise if any of the following are true
324
324
  * `(a, b) => boolean` is asynchronous
package/x/append.d.ts CHANGED
@@ -5,7 +5,7 @@ export = append;
5
5
  * @synopsis
6
6
  * ```coffeescript [specscript]
7
7
  * append(
8
- * item string|Array,
8
+ * element string|Array,
9
9
  * )(value string|Array) -> string|array
10
10
  * ```
11
11
  *
@@ -35,4 +35,4 @@ export = append;
35
35
  *
36
36
  * @since 1.7.3
37
37
  */
38
- declare function append(item: any): (value: any) => string | any[];
38
+ declare function append(element: any): (value: any) => string | any[];
package/x/append.js CHANGED
@@ -7,7 +7,7 @@ const isArray = require('../_internal/isArray')
7
7
  * @synopsis
8
8
  * ```coffeescript [specscript]
9
9
  * append(
10
- * item string|Array,
10
+ * element string|Array,
11
11
  * )(value string|Array) -> string|array
12
12
  * ```
13
13
  *
@@ -41,20 +41,20 @@ const isArray = require('../_internal/isArray')
41
41
  * @since 1.7.3
42
42
  */
43
43
 
44
- const append = item => function appendFunc(value) {
44
+ const append = element => function appendFunc(value) {
45
45
 
46
46
  if (isArray(value)) {
47
- if (isArray(item)){
48
- return [...value, ...item]
47
+ if (isArray(element)){
48
+ return [...value, ...element]
49
49
  }
50
- return [...value, item]
50
+ return [...value, element]
51
51
  }
52
52
 
53
53
  if (isString(value)){
54
- if (!isString(item)){
55
- throw new TypeError(`${item} is not a string`)
54
+ if (!isString(element)){
55
+ throw new TypeError(`${element} is not a string`)
56
56
  }
57
- return `${value}${item}`
57
+ return `${value}${element}`
58
58
  }
59
59
 
60
60
  throw new TypeError(`${value} is not an Array or string`)