rubico 2.8.5 → 2.8.6

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 (369) hide show
  1. package/README.md +1 -0
  2. package/_internal/curryArity.js +3 -3
  3. package/all.js +28 -53
  4. package/and.js +1 -1
  5. package/assign.js +14 -16
  6. package/compose.js +12 -13
  7. package/curry.js +1 -1
  8. package/dist/Transducer.es.js +1 -1
  9. package/dist/Transducer.es.min.js +1 -1
  10. package/dist/Transducer.js +1 -1
  11. package/dist/Transducer.min.js +1 -1
  12. package/dist/Transducer.mjs +1 -1
  13. package/dist/__.es.js +1 -1
  14. package/dist/__.es.min.js +1 -1
  15. package/dist/__.js +1 -1
  16. package/dist/__.min.js +1 -1
  17. package/dist/__.mjs +1 -1
  18. package/dist/all.es.js +1 -1
  19. package/dist/all.es.min.js +1 -1
  20. package/dist/all.js +1 -1
  21. package/dist/all.min.js +1 -1
  22. package/dist/all.mjs +1 -1
  23. package/dist/always.es.js +1 -1
  24. package/dist/always.es.min.js +1 -1
  25. package/dist/always.js +1 -1
  26. package/dist/always.min.js +1 -1
  27. package/dist/always.mjs +1 -1
  28. package/dist/and.es.js +1 -1
  29. package/dist/and.es.min.js +1 -1
  30. package/dist/and.js +1 -1
  31. package/dist/and.min.js +1 -1
  32. package/dist/and.mjs +1 -1
  33. package/dist/assign.es.js +1 -1
  34. package/dist/assign.es.min.js +1 -1
  35. package/dist/assign.js +1 -1
  36. package/dist/assign.min.js +1 -1
  37. package/dist/assign.mjs +1 -1
  38. package/dist/compose.es.js +1 -1
  39. package/dist/compose.es.min.js +1 -1
  40. package/dist/compose.js +1 -1
  41. package/dist/compose.min.js +1 -1
  42. package/dist/compose.mjs +1 -1
  43. package/dist/curry.es.js +4 -4
  44. package/dist/curry.es.min.js +2 -2
  45. package/dist/curry.js +4 -4
  46. package/dist/curry.min.js +2 -2
  47. package/dist/curry.mjs +4 -4
  48. package/dist/eq.es.js +1 -1
  49. package/dist/eq.es.min.js +1 -1
  50. package/dist/eq.js +1 -1
  51. package/dist/eq.min.js +1 -1
  52. package/dist/eq.mjs +1 -1
  53. package/dist/every.es.js +1 -1
  54. package/dist/every.es.min.js +1 -1
  55. package/dist/every.js +1 -1
  56. package/dist/every.min.js +1 -1
  57. package/dist/every.mjs +1 -1
  58. package/dist/filter.es.js +1 -1
  59. package/dist/filter.es.min.js +1 -1
  60. package/dist/filter.js +1 -1
  61. package/dist/filter.min.js +1 -1
  62. package/dist/filter.mjs +1 -1
  63. package/dist/flatMap.es.js +1 -1
  64. package/dist/flatMap.es.min.js +1 -1
  65. package/dist/flatMap.js +1 -1
  66. package/dist/flatMap.min.js +1 -1
  67. package/dist/flatMap.mjs +1 -1
  68. package/dist/forEach.es.js +1 -1
  69. package/dist/forEach.es.min.js +1 -1
  70. package/dist/forEach.js +1 -1
  71. package/dist/forEach.min.js +1 -1
  72. package/dist/forEach.mjs +1 -1
  73. package/dist/get.es.js +27 -3
  74. package/dist/get.es.min.js +2 -2
  75. package/dist/get.js +27 -3
  76. package/dist/get.min.js +2 -2
  77. package/dist/get.mjs +27 -3
  78. package/dist/gt.es.js +1 -1
  79. package/dist/gt.es.min.js +1 -1
  80. package/dist/gt.js +1 -1
  81. package/dist/gt.min.js +1 -1
  82. package/dist/gt.mjs +1 -1
  83. package/dist/gte.es.js +1 -1
  84. package/dist/gte.es.min.js +1 -1
  85. package/dist/gte.js +1 -1
  86. package/dist/gte.min.js +1 -1
  87. package/dist/gte.mjs +1 -1
  88. package/dist/lt.es.js +1 -1
  89. package/dist/lt.es.min.js +1 -1
  90. package/dist/lt.js +1 -1
  91. package/dist/lt.min.js +1 -1
  92. package/dist/lt.mjs +1 -1
  93. package/dist/lte.es.js +1 -1
  94. package/dist/lte.es.min.js +1 -1
  95. package/dist/lte.js +1 -1
  96. package/dist/lte.min.js +1 -1
  97. package/dist/lte.mjs +1 -1
  98. package/dist/map.es.js +4 -4
  99. package/dist/map.es.min.js +2 -2
  100. package/dist/map.js +4 -4
  101. package/dist/map.min.js +2 -2
  102. package/dist/map.mjs +4 -4
  103. package/dist/not.es.js +1 -1
  104. package/dist/not.es.min.js +1 -1
  105. package/dist/not.js +1 -1
  106. package/dist/not.min.js +1 -1
  107. package/dist/not.mjs +1 -1
  108. package/dist/omit.es.js +1 -1
  109. package/dist/omit.es.min.js +1 -1
  110. package/dist/omit.js +1 -1
  111. package/dist/omit.min.js +1 -1
  112. package/dist/omit.mjs +1 -1
  113. package/dist/or.es.js +1 -1
  114. package/dist/or.es.min.js +1 -1
  115. package/dist/or.js +1 -1
  116. package/dist/or.min.js +1 -1
  117. package/dist/or.mjs +1 -1
  118. package/dist/pick.es.js +1 -1
  119. package/dist/pick.es.min.js +1 -1
  120. package/dist/pick.js +1 -1
  121. package/dist/pick.min.js +1 -1
  122. package/dist/pick.mjs +1 -1
  123. package/dist/pipe.es.js +1 -1
  124. package/dist/pipe.es.min.js +1 -1
  125. package/dist/pipe.js +1 -1
  126. package/dist/pipe.min.js +1 -1
  127. package/dist/pipe.mjs +1 -1
  128. package/dist/reduce.es.js +1 -1
  129. package/dist/reduce.es.min.js +1 -1
  130. package/dist/reduce.js +1 -1
  131. package/dist/reduce.min.js +1 -1
  132. package/dist/reduce.mjs +1 -1
  133. package/dist/rubico.es.js +6 -6
  134. package/dist/rubico.es.min.js +2 -2
  135. package/dist/rubico.global.js +6 -6
  136. package/dist/rubico.global.min.js +2 -2
  137. package/dist/rubico.js +6 -6
  138. package/dist/rubico.min.js +2 -2
  139. package/dist/rubico.mjs +6 -6
  140. package/dist/set.es.js +1 -1
  141. package/dist/set.es.min.js +1 -1
  142. package/dist/set.js +1 -1
  143. package/dist/set.min.js +1 -1
  144. package/dist/set.mjs +1 -1
  145. package/dist/some.es.js +1 -1
  146. package/dist/some.es.min.js +1 -1
  147. package/dist/some.js +1 -1
  148. package/dist/some.min.js +1 -1
  149. package/dist/some.mjs +1 -1
  150. package/dist/switchCase.es.js +1 -1
  151. package/dist/switchCase.es.min.js +1 -1
  152. package/dist/switchCase.js +1 -1
  153. package/dist/switchCase.min.js +1 -1
  154. package/dist/switchCase.mjs +1 -1
  155. package/dist/tap.es.js +1 -1
  156. package/dist/tap.es.min.js +1 -1
  157. package/dist/tap.js +1 -1
  158. package/dist/tap.min.js +1 -1
  159. package/dist/tap.mjs +1 -1
  160. package/dist/thunkify.es.js +1 -1
  161. package/dist/thunkify.es.min.js +1 -1
  162. package/dist/thunkify.js +1 -1
  163. package/dist/thunkify.min.js +1 -1
  164. package/dist/thunkify.mjs +1 -1
  165. package/dist/transform.es.js +1 -1
  166. package/dist/transform.es.min.js +1 -1
  167. package/dist/transform.js +1 -1
  168. package/dist/transform.min.js +1 -1
  169. package/dist/transform.mjs +1 -1
  170. package/dist/tryCatch.es.js +1 -1
  171. package/dist/tryCatch.es.min.js +1 -1
  172. package/dist/tryCatch.js +1 -1
  173. package/dist/tryCatch.min.js +1 -1
  174. package/dist/tryCatch.mjs +1 -1
  175. package/dist/x/append.es.js +1 -1
  176. package/dist/x/append.es.min.js +1 -1
  177. package/dist/x/append.js +1 -1
  178. package/dist/x/append.min.js +1 -1
  179. package/dist/x/append.mjs +1 -1
  180. package/dist/x/callProp.es.js +1 -1
  181. package/dist/x/callProp.es.min.js +1 -1
  182. package/dist/x/callProp.js +1 -1
  183. package/dist/x/callProp.min.js +1 -1
  184. package/dist/x/callProp.mjs +1 -1
  185. package/dist/x/defaultsDeep.es.js +1 -1
  186. package/dist/x/defaultsDeep.es.min.js +1 -1
  187. package/dist/x/defaultsDeep.js +1 -1
  188. package/dist/x/defaultsDeep.min.js +1 -1
  189. package/dist/x/defaultsDeep.mjs +1 -1
  190. package/dist/x/differenceWith.es.js +1 -1
  191. package/dist/x/differenceWith.es.min.js +1 -1
  192. package/dist/x/differenceWith.js +1 -1
  193. package/dist/x/differenceWith.min.js +1 -1
  194. package/dist/x/differenceWith.mjs +1 -1
  195. package/dist/x/filterOut.es.js +1 -1
  196. package/dist/x/filterOut.es.min.js +1 -1
  197. package/dist/x/filterOut.js +1 -1
  198. package/dist/x/filterOut.min.js +1 -1
  199. package/dist/x/filterOut.mjs +1 -1
  200. package/dist/x/find.es.js +1 -1
  201. package/dist/x/find.es.min.js +1 -1
  202. package/dist/x/find.js +1 -1
  203. package/dist/x/find.min.js +1 -1
  204. package/dist/x/find.mjs +1 -1
  205. package/dist/x/findIndex.es.js +1 -1
  206. package/dist/x/findIndex.es.min.js +1 -1
  207. package/dist/x/findIndex.js +1 -1
  208. package/dist/x/findIndex.min.js +1 -1
  209. package/dist/x/findIndex.mjs +1 -1
  210. package/dist/x/first.es.js +1 -1
  211. package/dist/x/first.es.min.js +1 -1
  212. package/dist/x/first.js +1 -1
  213. package/dist/x/first.min.js +1 -1
  214. package/dist/x/first.mjs +1 -1
  215. package/dist/x/flatten.es.js +1 -1
  216. package/dist/x/flatten.es.min.js +1 -1
  217. package/dist/x/flatten.js +1 -1
  218. package/dist/x/flatten.min.js +1 -1
  219. package/dist/x/flatten.mjs +1 -1
  220. package/dist/x/groupBy.es.js +1 -1
  221. package/dist/x/groupBy.es.min.js +1 -1
  222. package/dist/x/groupBy.js +1 -1
  223. package/dist/x/groupBy.min.js +1 -1
  224. package/dist/x/groupBy.mjs +1 -1
  225. package/dist/x/has.es.js +1 -1
  226. package/dist/x/has.es.min.js +1 -1
  227. package/dist/x/has.js +1 -1
  228. package/dist/x/has.min.js +1 -1
  229. package/dist/x/has.mjs +1 -1
  230. package/dist/x/identity.es.js +1 -1
  231. package/dist/x/identity.es.min.js +1 -1
  232. package/dist/x/identity.js +1 -1
  233. package/dist/x/identity.min.js +1 -1
  234. package/dist/x/identity.mjs +1 -1
  235. package/dist/x/includes.es.js +1 -1
  236. package/dist/x/includes.es.min.js +1 -1
  237. package/dist/x/includes.js +1 -1
  238. package/dist/x/includes.min.js +1 -1
  239. package/dist/x/includes.mjs +1 -1
  240. package/dist/x/isDeepEqual.es.js +1 -1
  241. package/dist/x/isDeepEqual.es.min.js +1 -1
  242. package/dist/x/isDeepEqual.js +1 -1
  243. package/dist/x/isDeepEqual.min.js +1 -1
  244. package/dist/x/isDeepEqual.mjs +1 -1
  245. package/dist/x/isEmpty.es.js +1 -1
  246. package/dist/x/isEmpty.es.min.js +1 -1
  247. package/dist/x/isEmpty.js +1 -1
  248. package/dist/x/isEmpty.min.js +1 -1
  249. package/dist/x/isEmpty.mjs +1 -1
  250. package/dist/x/isEqual.es.js +1 -1
  251. package/dist/x/isEqual.es.min.js +1 -1
  252. package/dist/x/isEqual.js +1 -1
  253. package/dist/x/isEqual.min.js +1 -1
  254. package/dist/x/isEqual.mjs +1 -1
  255. package/dist/x/isFunction.es.js +1 -1
  256. package/dist/x/isFunction.es.min.js +1 -1
  257. package/dist/x/isFunction.js +1 -1
  258. package/dist/x/isFunction.min.js +1 -1
  259. package/dist/x/isFunction.mjs +1 -1
  260. package/dist/x/isIn.es.js +1 -1
  261. package/dist/x/isIn.es.min.js +1 -1
  262. package/dist/x/isIn.js +1 -1
  263. package/dist/x/isIn.min.js +1 -1
  264. package/dist/x/isIn.mjs +1 -1
  265. package/dist/x/isObject.es.js +1 -1
  266. package/dist/x/isObject.es.min.js +1 -1
  267. package/dist/x/isObject.js +1 -1
  268. package/dist/x/isObject.min.js +1 -1
  269. package/dist/x/isObject.mjs +1 -1
  270. package/dist/x/isString.es.js +1 -1
  271. package/dist/x/isString.es.min.js +1 -1
  272. package/dist/x/isString.js +1 -1
  273. package/dist/x/isString.min.js +1 -1
  274. package/dist/x/isString.mjs +1 -1
  275. package/dist/x/keys.es.js +1 -1
  276. package/dist/x/keys.es.min.js +1 -1
  277. package/dist/x/keys.js +1 -1
  278. package/dist/x/keys.min.js +1 -1
  279. package/dist/x/keys.mjs +1 -1
  280. package/dist/x/last.es.js +1 -1
  281. package/dist/x/last.es.min.js +1 -1
  282. package/dist/x/last.js +1 -1
  283. package/dist/x/last.min.js +1 -1
  284. package/dist/x/last.mjs +1 -1
  285. package/dist/x/maxBy.es.js +27 -23
  286. package/dist/x/maxBy.es.min.js +2 -2
  287. package/dist/x/maxBy.js +27 -23
  288. package/dist/x/maxBy.min.js +2 -2
  289. package/dist/x/maxBy.mjs +27 -23
  290. package/dist/x/noop.es.js +1 -1
  291. package/dist/x/noop.es.min.js +1 -1
  292. package/dist/x/noop.js +1 -1
  293. package/dist/x/noop.min.js +1 -1
  294. package/dist/x/noop.mjs +1 -1
  295. package/dist/x/pluck.es.js +8 -6
  296. package/dist/x/pluck.es.min.js +2 -2
  297. package/dist/x/pluck.js +8 -6
  298. package/dist/x/pluck.min.js +2 -2
  299. package/dist/x/pluck.mjs +8 -6
  300. package/dist/x/prepend.es.js +1 -1
  301. package/dist/x/prepend.es.min.js +1 -1
  302. package/dist/x/prepend.js +1 -1
  303. package/dist/x/prepend.min.js +1 -1
  304. package/dist/x/prepend.mjs +1 -1
  305. package/dist/x/size.es.js +1 -1
  306. package/dist/x/size.es.min.js +1 -1
  307. package/dist/x/size.js +1 -1
  308. package/dist/x/size.min.js +1 -1
  309. package/dist/x/size.mjs +1 -1
  310. package/dist/x/trace.es.js +1 -1
  311. package/dist/x/trace.es.min.js +1 -1
  312. package/dist/x/trace.js +1 -1
  313. package/dist/x/trace.min.js +1 -1
  314. package/dist/x/trace.mjs +1 -1
  315. package/dist/x/unionWith.es.js +1 -1
  316. package/dist/x/unionWith.es.min.js +1 -1
  317. package/dist/x/unionWith.js +1 -1
  318. package/dist/x/unionWith.min.js +1 -1
  319. package/dist/x/unionWith.mjs +1 -1
  320. package/dist/x/uniq.es.js +1 -1
  321. package/dist/x/uniq.es.min.js +1 -1
  322. package/dist/x/uniq.js +1 -1
  323. package/dist/x/uniq.min.js +1 -1
  324. package/dist/x/uniq.mjs +1 -1
  325. package/dist/x/unless.es.js +1 -1
  326. package/dist/x/unless.es.min.js +1 -1
  327. package/dist/x/unless.js +1 -1
  328. package/dist/x/unless.min.js +1 -1
  329. package/dist/x/unless.mjs +1 -1
  330. package/dist/x/values.es.js +1 -1
  331. package/dist/x/values.es.min.js +1 -1
  332. package/dist/x/values.js +1 -1
  333. package/dist/x/values.min.js +1 -1
  334. package/dist/x/values.mjs +1 -1
  335. package/dist/x/when.es.js +1 -1
  336. package/dist/x/when.es.min.js +1 -1
  337. package/dist/x/when.js +1 -1
  338. package/dist/x/when.min.js +1 -1
  339. package/dist/x/when.mjs +1 -1
  340. package/eq.js +1 -1
  341. package/es.js +6 -6
  342. package/every.js +1 -1
  343. package/filter.js +1 -1
  344. package/flatMap.js +1 -1
  345. package/forEach.js +2 -2
  346. package/get.js +46 -24
  347. package/gt.js +1 -1
  348. package/gte.js +1 -1
  349. package/index.js +6 -6
  350. package/lt.js +1 -1
  351. package/lte.js +1 -1
  352. package/map.js +4 -4
  353. package/monad/Mux.js +6 -4
  354. package/monad/PossiblePromise.js +6 -4
  355. package/monad/README.md +60 -39
  356. package/monad/Struct.js +6 -4
  357. package/not.js +1 -1
  358. package/omit.js +1 -1
  359. package/or.js +1 -1
  360. package/package.json +1 -1
  361. package/pick.js +1 -1
  362. package/pipe.js +18 -24
  363. package/reduce.js +1 -1
  364. package/set.js +1 -1
  365. package/some.js +1 -1
  366. package/switchCase.js +41 -41
  367. package/tap.js +13 -21
  368. package/transform.js +1 -1
  369. package/tryCatch.js +16 -24
package/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
  ![rubico](https://raw.githubusercontent.com/a-synchronous/assets/master/rubico-logo.png)
3
3
  > a shallow river in northeastern Italy, just south of Ravenna
4
4
 
5
+ Source code: [GitHub](https://github.com/a-synchronous/rubico) |
5
6
  License: [CFOSS](https://cloutsworld.com/en-us/legal/license/cfoss)
6
7
 
7
8
  ![Node.js CI](https://github.com/a-synchronous/rubico/workflows/Node.js%20CI/badge.svg)
@@ -29,7 +29,7 @@ const _curryArity = (arity, func, context, args) => function curried(...curriedA
29
29
  curriedArgsIndex = -1,
30
30
  numCurriedPlaceholders = 0
31
31
 
32
- while (++argsIndex < argsLength) {
32
+ while ((argsIndex += 1) < argsLength) {
33
33
  const arg = args[argsIndex]
34
34
  if (arg == __ && (curriedArgsIndex += 1) < curriedArgsLength) {
35
35
  const curriedArg = curriedArgs[curriedArgsIndex]
@@ -53,7 +53,7 @@ const _curryArity = (arity, func, context, args) => function curried(...curriedA
53
53
  }
54
54
  }
55
55
 
56
- while (++curriedArgsIndex < curriedArgsLength) {
56
+ while ((curriedArgsIndex += 1) < curriedArgsLength) {
57
57
  const curriedArg = curriedArgs[curriedArgsIndex]
58
58
  if (curriedArg == __) {
59
59
  numCurriedPlaceholders += 1
@@ -103,7 +103,7 @@ const curryArity = function (arity, func, context, args) {
103
103
  return _curryArity(arity, func, context, args)
104
104
  }
105
105
  let argsIndex = -1
106
- while (++argsIndex < argsLength) {
106
+ while ((argsIndex += 1) < argsLength) {
107
107
  const arg = args[argsIndex]
108
108
  if (arg == __) {
109
109
  return _curryArity(arity, func, context, args)
package/all.js CHANGED
@@ -36,42 +36,35 @@ const _allValues = function (values) {
36
36
  *
37
37
  * @synopsis
38
38
  * ```coffeescript [specscript]
39
- * args Array<any>
40
- * argsOrPromises Array<Promise|any>
39
+ * type SyncOrAsyncResolver = (...arguments)=>Promise|any
40
+ * type ResolverOrValue = SyncOrAsyncResolver|Promise|any
41
41
  *
42
- * type SyncOrAsyncResolver = (...args)=>Promise|any
42
+ * all(Promise|Array<Promise|any>) -> Promise|Array
43
+ * all(...arguments, Array<ResolverOrValue>) -> Promise|Array
44
+ * all(Array<ResolverOrValue>)(...arguments) -> Promise|Array
43
45
  *
44
- * arrayResolversOrPromisesOrValues Array<SyncOrAsyncResolver|Promise|any>
45
- * objectResolversOrPromisesOrValues Object<SyncOrAsyncResolver|Promise|any>
46
- *
47
- * all(arrayValues Promise|Array<Promise|any>) -> arrayResult Promise|Array
48
- * all(...argsOrPromises, arrayResolversOrPromisesOrValues) -> arrayResult Promise|Array
49
- * all(arrayResolversOrPromisesOrValues)(...args) -> arrayResult Promise|Array
50
- *
51
- * all(objectValues Promise|Object<Promise|any>) -> objectResult Promise|Object
52
- * all(...argsOrPromises, objectResolversOrPromisesOrValues) -> objectResult Promise|Object
53
- * all(objectResolversOrPromisesOrValues)(...args) -> objectResult Promise|Object
46
+ * all(Promise|Object<Promise|any>) -> Promise|Object
47
+ * all(...arguments, Object<ResolverOrValue>) -> Promise|Object
48
+ * all(Object<ResolverOrValue>)(...arguments) -> Promise|Object
54
49
  * ```
55
50
  *
56
51
  * @description
57
- * Constructs an array if provided an array of resolvers, promises, values, or a mix thereof. Constructs an object if provided an object of resolvers, promises, values, or a mix thereof. If provided any resolvers, `all` returns a function that constructs the array or object. Otherwise, if none of the provided values in the array or object are functions, `all` returns the constructed array or object directly.
58
- *
59
- * `all` constructs an array from resolvers.
52
+ * Function composer and data constructor. Constructs an array if provided an array of resolvers, promises, or values. Constructs an object if provided an object of resolvers, promises, or values. `all` returns a constructor function if provided resolvers. Otherwise, `all` returns the constructed array or object directly.
60
53
  *
61
54
  * ```javascript [playground]
62
- * const createArrayOfGreetingsFor = all([
55
+ * const createArrayOfGreetings = all([
63
56
  * name => `Hi ${name}`,
64
- * name => `Hey ${name}`,
65
57
  * name => `Hello ${name}`,
58
+ * name => `Greetings ${name}`,
66
59
  * ])
67
60
  *
68
- * const arrayOfGreetingsFor1 = createArrayOfGreetingsFor('1')
61
+ * const arrayOfGreetings = createArrayOfGreetings('example')
69
62
  *
70
63
  * console.log(arrayOfGreetingsFor1)
71
- * // ['Hi 1', 'Hey 1', 'Hello 1']
64
+ * // ['Hi example', 'Hello example', 'Gretings example']
72
65
  * ```
73
66
  *
74
- * If any provided values are promises, `all` returns a promise.
67
+ * If provided promises, `all` resolves those promises and returns a promise of the resolved values.
75
68
  *
76
69
  * ```javascript [playground]
77
70
  * const promise1 = all([
@@ -79,23 +72,25 @@ const _allValues = function (values) {
79
72
  * Promise.resolve(2),
80
73
  * 3,
81
74
  * ])
82
- * promise1.then(console.log) // [1, 2, 3]
75
+ *
76
+ * promise1.then(console.log)
83
77
  *
84
78
  * const promise2 = all({
85
79
  * a: 1,
86
80
  * b: Promise.resolve(2),
87
81
  * c: Promise.resolve(3),
88
82
  * })
89
- * promise2.then(console.log) // { a: 1, b: 2, c: 3 }
83
+ *
84
+ * promise2.then(console.log)
90
85
  * ```
91
86
  *
92
- * If any provided resolvers are asynchronous, `all` returns a promise. `all` can be used in a pipeline to compose and manpulate data.
87
+ * If any resolvers provided to `all` are asynchronous, `all` returns a promise.
93
88
  *
94
89
  * ```javascript [playground]
95
90
  * const identity = value => value
96
91
  *
97
92
  * const userbase = new Map()
98
- * userbase.set('1', { _id: 1, name: 'John' })
93
+ * userbase.set('1', { id: 1, name: 'John' })
99
94
  *
100
95
  * const getUserByID = async id => userbase.get(id)
101
96
  *
@@ -109,35 +104,17 @@ const _allValues = function (values) {
109
104
  * }),
110
105
  * ])
111
106
  *
112
- * getAndLogUserById('1') // Got user {"_id":1,"name":"John"} by id 1
107
+ * getAndLogUserById('1')
113
108
  * ```
114
109
  *
115
- * Provided no resolvers, `all` returns the constructed array or object.
116
- *
117
- * ```javascript [playground]
118
- * all({}, {
119
- * a: Promise.resolve(1),
120
- * b: 2,
121
- * c: () => 3,
122
- * d: async () => 4,
123
- * }).then(console.log) // { a: 1, b: 2, c: 3, d: 4 }
124
- *
125
- * all([], [
126
- * Promise.resolve(1),
127
- * 2,
128
- * () => 3,
129
- * async () => 4,
130
- * ]).then(console.log) // [1, 2, 3, 4]
131
- * ```
132
- *
133
- * Any promises passed in argument position are resolved for their values before further execution. This only applies to the eager version of the API.
110
+ * Any promises passed in argument position are resolved for their values before further execution.
134
111
  *
135
112
  * ```javascript [playground]
136
113
  * all(Promise.resolve({ a: 1 }), [
137
114
  * obj => obj.a + 1,
138
115
  * obj => obj.a + 2,
139
116
  * obj => obj.a + 3,
140
- * ]).then(console.log) // [2, 3, 4]
117
+ * ]).then(console.log)
141
118
  * ```
142
119
  *
143
120
  * See also:
@@ -186,9 +163,9 @@ const all = function (...args) {
186
163
  *
187
164
  * @synopsis
188
165
  * ```coffeescript [specscript]
189
- * all.series(...args, funcsArray Array<function>) -> result Promise|Array
166
+ * all.series(...arguments, Array<function>) -> Promise|Array
190
167
  *
191
- * all.series(funcsArray Array<function>)(...args) -> result Promise|Array
168
+ * all.series(Array<function>)(...arguments) -> Promise|Array
192
169
  * ```
193
170
  *
194
171
  * @description
@@ -197,15 +174,13 @@ const all = function (...args) {
197
174
  * ```javascript [playground]
198
175
  * const sleep = ms => () => new Promise(resolve => setTimeout(resolve, ms))
199
176
  *
200
- * all.series([
177
+ * all.series('hello', [
201
178
  * greeting => console.log(greeting + ' world'),
202
179
  * sleep(1000),
203
- * greeting => console.log(greeting + ' mom'),
180
+ * greeting => console.log(greeting + ' all'),
204
181
  * sleep(1000),
205
182
  * greeting => console.log(greeting + ' goodbye'),
206
- * ])('hello') // hello world
207
- * // hello mom
208
- * // hello goodbye
183
+ * ])
209
184
  * ```
210
185
  *
211
186
  * @execution series
package/and.js CHANGED
@@ -145,7 +145,7 @@ const areAllPredicatesTruthy = function (args, predicates) {
145
145
  * console.log(condition) // true
146
146
  * ```
147
147
  *
148
- * Any promises passed in argument position are resolved for their values before further execution. This only applies to the eager version of the API.
148
+ * Any promises passed in argument position are resolved for their values before further execution.
149
149
  *
150
150
  * ```javascript [playground]
151
151
  * and(Promise.resolve(5), [
package/assign.js CHANGED
@@ -18,36 +18,33 @@ const _assign = function (object, funcs) {
18
18
  *
19
19
  * @synopsis
20
20
  * ```coffeescript [specscript]
21
- * args Array<any>
22
- *
23
21
  * type UnarySyncOrAsyncResolver = any=>Promise|any
24
22
  *
25
- * objectResolversOrPromisesOrValues Object<UnarySyncOrAsyncResolver|Promise|any>
26
- *
27
- * assign(argumentObject Promise|Object, objectResolversOrPromisesOrValues) -> resultObject
28
- * assign(objectResolversOrPromisesOrValues)(argumentObject Object) -> resultObject
23
+ * assign(Promise|Object, Object<UnarySyncOrAsyncResolver|Promise|any>) -> Promise|Object
24
+ * assign(Object<UnarySyncOrAsyncResolver|Promise|any>)(Object) -> Promise|Object
29
25
  * ```
30
26
  *
31
27
  * @description
32
- * Function equivalent to [Object.assign](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign). Constructs an object `result` from an object `objectResolversOrPromisesOrValues` of resolvers, promises, values, or a mix thereof and an argument object `argumentObject`.
28
+ * Function composer and data constructor. Constructs a new object from an argument object and an object of resolvers, promises, or values.
33
29
  *
34
- * If any values of `objectResolversOrPromisesOrValues` are resolvers, `assign` provides the `argumentObject` to those resolvers to resolve the values for assignment in `resultObject`.
30
+ * If provided resolver functions, `assign` resolves the values to be assigned at the keys of the resolver functions in the new object by calling those resolvers with the argument object.
35
31
  *
36
32
  * ```javascript [playground]
37
33
  * const assignSquaredAndCubed = assign({
38
34
  * squared: ({ number }) => number ** 2,
39
35
  * cubed: ({ number }) => number ** 3,
40
- * n: 1,
41
36
  * })
42
37
  *
43
38
  * console.log(assignSquaredAndCubed({ number: 2 }))
44
- * // { number: 2, squared: 4, cubed: 8, n: 1 }
45
- *
46
39
  * console.log(assignSquaredAndCubed({ number: 3 }))
47
- * // { number: 3, squared: 9, cubed: 27, n: 1 }
40
+ *
41
+ * const n = 1
42
+ * const assignN = assign({ n })
43
+ *
44
+ * console.log(assignN({}))
48
45
  * ```
49
46
  *
50
- * If any of the resolvers in `objectResolversOrPromisesOrValues` are asynchronous, `assign` returns a promise of `resultObject`.
47
+ * If any of the resolvers provided to `assign` are asynchronous, the execution of `assign` with the argument object returns a promise.
51
48
  *
52
49
  * ```javascript [playground]
53
50
  * const sleep = ms => new Promise(resolve => setTimeout(resolve, ms))
@@ -59,11 +56,12 @@ const _assign = function (object, funcs) {
59
56
  * },
60
57
  * })
61
58
  *
62
- * asyncAssignTotal({ numbers: [1, 2, 3, 4, 5] }).then(console.log)
63
- * // { numbers: [1, 2, 3, 4, 5], total: 15 }
59
+ * const promise = asyncAssignTotal({ numbers: [1, 2, 3, 4, 5] })
60
+ *
61
+ * promise.then(console.log)
64
62
  * ```
65
63
  *
66
- * Any promises passed in argument position are resolved for their values before further execution. This only applies to the eager version of the API.
64
+ * Any promises passed in argument position are resolved for their values before further execution.
67
65
  *
68
66
  * ```javascript [playground]
69
67
  * assign(Promise.resolve({}), {
package/compose.js CHANGED
@@ -10,31 +10,30 @@ const funcConcat = require('./_internal/funcConcat')
10
10
  *
11
11
  * @synopsis
12
12
  * ```coffeescript [specscript]
13
- * args Array<any>
14
- * argsOrPromises Array<Promise|any>
15
- *
16
- * type SyncOrAsyncFunction = (...args)=>Promise|any
13
+ * type SyncOrAsyncFunction = (...arguments)=>Promise|any
17
14
  * type UnarySyncOrAsyncFunction = any=>Promise|any
18
15
  *
19
16
  * funcs [SyncOrAsyncFunction, ...Array<UnarySyncOrAsyncFunction>]
20
17
  *
21
- * compose(funcs)(...args) -> result Promise|any
22
- * compose(...argsOrPromises, funcs) -> result Promise|any
23
- * compose(...funcs)(...args) -> result Promise|any
18
+ * compose(funcs)(...arguments) -> Promise|any
19
+ * compose(...arguments, funcs) -> Promise|any
20
+ * compose(...funcs)(...arguments) -> Promise|any
24
21
  * ```
25
22
  *
26
23
  * @description
27
- * Creates a function composition from multiple functions. Each function in the composition is evaluated starting from the last function in the composition in series, passing its return value as an argument to the previous function. The result of a composition execution is the return value of the first function in the composition. All arguments provided to the composition are provided to the last function in the composition. If any function in the composition is asynchronous, the result of the composition execution is a Promise.
24
+ * Creates a function composition from multiple functions. Each function in the function composition is evaluated in series starting from the last function in the function composition, passing its return value as the first and only argument to the previous function in the function composition. The result of the execution of a function composition is the return value of the first function in the function composition. If any function in the function composition is asynchronous, the result of the execution of the function composition is a promise.
25
+ *
26
+ * Multiple arguments may be provided to a function composition, in which case they are passed directly to the last function in the function composition.
28
27
  *
29
28
  * ```javascript [playground]
30
29
  * const f = x => x * 2
31
30
  * const g = x => x + 3
32
31
  *
33
32
  * const result = compose(5, [f, g])
34
- * console.log(result) // 16
33
+ * console.log(result)
35
34
  * ```
36
35
  *
37
- * `compose` supports a mathematical API.
36
+ * Functions may be passed to `compose` as arguments instead of as items of an array.
38
37
  *
39
38
  * ```javascript [playground]
40
39
  * const f = x => x * 2
@@ -42,14 +41,14 @@ const funcConcat = require('./_internal/funcConcat')
42
41
  *
43
42
  * const composition = compose(f, g)
44
43
  *
45
- * console.log(composition(1)) // 4
44
+ * console.log(composition(1))
46
45
  * ```
47
46
  *
48
- * Any promises passed in argument position are resolved for their values before further execution. This only applies to the eager version of the API.
47
+ * Any promises passed in argument position are resolved for their values before further execution.
49
48
  *
50
49
  * ```javascript [playground]
51
50
  * compose(Promise.resolve(1), 2, Promise.resolve(3), [
52
- * console.log, // [1, 2, 3]
51
+ * console.log,
53
52
  * ])
54
53
  * ```
55
54
  *
package/curry.js CHANGED
@@ -37,7 +37,7 @@ const curryArity = require('./_internal/curryArity')
37
37
  * console.log(curry(add, __, __, 'c')(__, 'b')('a'))
38
38
  * ```
39
39
  *
40
- * Any promises passed in argument position are resolved for their values before further execution. This only applies to the eager version of the API.
40
+ * Any promises passed in argument position are resolved for their values before further execution.
41
41
  *
42
42
  * ```javascript [playground]
43
43
  * const add = (a, b, c) => a + b + c
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.5
2
+ * Rubico v2.8.6
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.5
2
+ * Rubico v2.8.6
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.5
2
+ * Rubico v2.8.6
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.5
2
+ * Rubico v2.8.6
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.5
2
+ * Rubico v2.8.6
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/__.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.5
2
+ * Rubico v2.8.6
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/__.es.min.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.5
2
+ * Rubico v2.8.6
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/__.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.5
2
+ * Rubico v2.8.6
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/__.min.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.5
2
+ * Rubico v2.8.6
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/__.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.5
2
+ * Rubico v2.8.6
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/all.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.5
2
+ * Rubico v2.8.6
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.5
2
+ * Rubico v2.8.6
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/all.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.5
2
+ * Rubico v2.8.6
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/all.min.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.5
2
+ * Rubico v2.8.6
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/all.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.5
2
+ * Rubico v2.8.6
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/always.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.5
2
+ * Rubico v2.8.6
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.5
2
+ * Rubico v2.8.6
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/always.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.5
2
+ * Rubico v2.8.6
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.5
2
+ * Rubico v2.8.6
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/always.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.5
2
+ * Rubico v2.8.6
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/and.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.5
2
+ * Rubico v2.8.6
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.5
2
+ * Rubico v2.8.6
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/and.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.5
2
+ * Rubico v2.8.6
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/and.min.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.5
2
+ * Rubico v2.8.6
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/and.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.5
2
+ * Rubico v2.8.6
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/assign.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.5
2
+ * Rubico v2.8.6
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.5
2
+ * Rubico v2.8.6
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/assign.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.5
2
+ * Rubico v2.8.6
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.5
2
+ * Rubico v2.8.6
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/assign.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.5
2
+ * Rubico v2.8.6
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.5
2
+ * Rubico v2.8.6
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.5
2
+ * Rubico v2.8.6
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/compose.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.5
2
+ * Rubico v2.8.6
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.5
2
+ * Rubico v2.8.6
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/compose.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.5
2
+ * Rubico v2.8.6
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software