rubico 2.1.0 → 2.2.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 (499) hide show
  1. package/README.md +2 -0
  2. package/_internal/genericTransform.js +30 -28
  3. package/dist/Transducer.es.js +1 -1
  4. package/dist/Transducer.es.min.js +1 -1
  5. package/dist/Transducer.js +1 -1
  6. package/dist/Transducer.min.js +1 -1
  7. package/dist/Transducer.mjs +1 -1
  8. package/dist/__.es.js +1 -1
  9. package/dist/__.es.min.js +1 -1
  10. package/dist/__.js +1 -1
  11. package/dist/__.min.js +1 -1
  12. package/dist/__.mjs +1 -1
  13. package/dist/all.es.js +1 -1
  14. package/dist/all.es.min.js +1 -1
  15. package/dist/all.js +1 -1
  16. package/dist/all.min.js +1 -1
  17. package/dist/all.mjs +1 -1
  18. package/dist/always.es.js +1 -1
  19. package/dist/always.es.min.js +1 -1
  20. package/dist/always.js +1 -1
  21. package/dist/always.min.js +1 -1
  22. package/dist/always.mjs +1 -1
  23. package/dist/and.es.js +1 -1
  24. package/dist/and.es.min.js +1 -1
  25. package/dist/and.js +1 -1
  26. package/dist/and.min.js +1 -1
  27. package/dist/and.mjs +1 -1
  28. package/dist/assign.es.js +1 -1
  29. package/dist/assign.es.min.js +1 -1
  30. package/dist/assign.js +1 -1
  31. package/dist/assign.min.js +1 -1
  32. package/dist/assign.mjs +1 -1
  33. package/dist/compose.es.js +1 -1
  34. package/dist/compose.es.min.js +1 -1
  35. package/dist/compose.js +1 -1
  36. package/dist/compose.min.js +1 -1
  37. package/dist/compose.mjs +1 -1
  38. package/dist/curry.es.js +1 -1
  39. package/dist/curry.es.min.js +1 -1
  40. package/dist/curry.js +1 -1
  41. package/dist/curry.min.js +1 -1
  42. package/dist/curry.mjs +1 -1
  43. package/dist/eq.es.js +1 -1
  44. package/dist/eq.es.min.js +1 -1
  45. package/dist/eq.js +1 -1
  46. package/dist/eq.min.js +1 -1
  47. package/dist/eq.mjs +1 -1
  48. package/dist/every.es.js +1 -1
  49. package/dist/every.es.min.js +1 -1
  50. package/dist/every.js +1 -1
  51. package/dist/every.min.js +1 -1
  52. package/dist/every.mjs +1 -1
  53. package/dist/filter.es.js +1 -1
  54. package/dist/filter.es.min.js +1 -1
  55. package/dist/filter.js +1 -1
  56. package/dist/filter.min.js +1 -1
  57. package/dist/filter.mjs +1 -1
  58. package/dist/flatMap.es.js +1 -1
  59. package/dist/flatMap.es.min.js +1 -1
  60. package/dist/flatMap.js +1 -1
  61. package/dist/flatMap.min.js +1 -1
  62. package/dist/flatMap.mjs +1 -1
  63. package/dist/forEach.es.js +1 -1
  64. package/dist/forEach.es.min.js +1 -1
  65. package/dist/forEach.js +1 -1
  66. package/dist/forEach.min.js +1 -1
  67. package/dist/forEach.mjs +1 -1
  68. package/dist/get.es.js +1 -1
  69. package/dist/get.es.min.js +1 -1
  70. package/dist/get.js +1 -1
  71. package/dist/get.min.js +1 -1
  72. package/dist/get.mjs +1 -1
  73. package/dist/gt.es.js +1 -1
  74. package/dist/gt.es.min.js +1 -1
  75. package/dist/gt.js +1 -1
  76. package/dist/gt.min.js +1 -1
  77. package/dist/gt.mjs +1 -1
  78. package/dist/gte.es.js +1 -1
  79. package/dist/gte.es.min.js +1 -1
  80. package/dist/gte.js +1 -1
  81. package/dist/gte.min.js +1 -1
  82. package/dist/gte.mjs +1 -1
  83. package/dist/lt.es.js +1 -1
  84. package/dist/lt.es.min.js +1 -1
  85. package/dist/lt.js +1 -1
  86. package/dist/lt.min.js +1 -1
  87. package/dist/lt.mjs +1 -1
  88. package/dist/lte.es.js +1 -1
  89. package/dist/lte.es.min.js +1 -1
  90. package/dist/lte.js +1 -1
  91. package/dist/lte.min.js +1 -1
  92. package/dist/lte.mjs +1 -1
  93. package/dist/map.es.js +1 -1
  94. package/dist/map.es.min.js +1 -1
  95. package/dist/map.js +1 -1
  96. package/dist/map.min.js +1 -1
  97. package/dist/map.mjs +1 -1
  98. package/dist/not.es.js +1 -1
  99. package/dist/not.es.min.js +1 -1
  100. package/dist/not.js +1 -1
  101. package/dist/not.min.js +1 -1
  102. package/dist/not.mjs +1 -1
  103. package/dist/omit.es.js +1 -1
  104. package/dist/omit.es.min.js +1 -1
  105. package/dist/omit.js +1 -1
  106. package/dist/omit.min.js +1 -1
  107. package/dist/omit.mjs +1 -1
  108. package/dist/or.es.js +1 -1
  109. package/dist/or.es.min.js +1 -1
  110. package/dist/or.js +1 -1
  111. package/dist/or.min.js +1 -1
  112. package/dist/or.mjs +1 -1
  113. package/dist/pick.es.js +1 -1
  114. package/dist/pick.es.min.js +1 -1
  115. package/dist/pick.js +1 -1
  116. package/dist/pick.min.js +1 -1
  117. package/dist/pick.mjs +1 -1
  118. package/dist/pipe.es.js +1 -1
  119. package/dist/pipe.es.min.js +1 -1
  120. package/dist/pipe.js +1 -1
  121. package/dist/pipe.min.js +1 -1
  122. package/dist/pipe.mjs +1 -1
  123. package/dist/reduce.es.js +1 -1
  124. package/dist/reduce.es.min.js +1 -1
  125. package/dist/reduce.js +1 -1
  126. package/dist/reduce.min.js +1 -1
  127. package/dist/reduce.mjs +1 -1
  128. package/dist/rubico.es.js +57 -46
  129. package/dist/rubico.es.min.js +2 -2
  130. package/dist/rubico.global.js +57 -46
  131. package/dist/rubico.global.min.js +2 -2
  132. package/dist/rubico.js +57 -46
  133. package/dist/rubico.min.js +2 -2
  134. package/dist/rubico.mjs +57 -46
  135. package/dist/set.es.js +1 -1
  136. package/dist/set.es.min.js +1 -1
  137. package/dist/set.js +1 -1
  138. package/dist/set.min.js +1 -1
  139. package/dist/set.mjs +1 -1
  140. package/dist/some.es.js +1 -1
  141. package/dist/some.es.min.js +1 -1
  142. package/dist/some.js +1 -1
  143. package/dist/some.min.js +1 -1
  144. package/dist/some.mjs +1 -1
  145. package/dist/switchCase.es.js +1 -1
  146. package/dist/switchCase.es.min.js +1 -1
  147. package/dist/switchCase.js +1 -1
  148. package/dist/switchCase.min.js +1 -1
  149. package/dist/switchCase.mjs +1 -1
  150. package/dist/tap.es.js +32 -2
  151. package/dist/tap.es.min.js +2 -2
  152. package/dist/tap.js +32 -2
  153. package/dist/tap.min.js +2 -2
  154. package/dist/tap.mjs +32 -2
  155. package/dist/thunkify.es.js +1 -1
  156. package/dist/thunkify.es.min.js +1 -1
  157. package/dist/thunkify.js +1 -1
  158. package/dist/thunkify.min.js +1 -1
  159. package/dist/thunkify.mjs +1 -1
  160. package/dist/transform.es.js +26 -24
  161. package/dist/transform.es.min.js +2 -2
  162. package/dist/transform.js +26 -24
  163. package/dist/transform.min.js +2 -2
  164. package/dist/transform.mjs +26 -24
  165. package/dist/tryCatch.es.js +1 -1
  166. package/dist/tryCatch.es.min.js +1 -1
  167. package/dist/tryCatch.js +1 -1
  168. package/dist/tryCatch.min.js +1 -1
  169. package/dist/tryCatch.mjs +1 -1
  170. package/dist/x/append.es.js +1 -1
  171. package/dist/x/append.es.min.js +1 -1
  172. package/dist/x/append.js +1 -1
  173. package/dist/x/append.min.js +1 -1
  174. package/dist/x/append.mjs +1 -1
  175. package/dist/x/callProp.es.js +1 -1
  176. package/dist/x/callProp.es.min.js +1 -1
  177. package/dist/x/callProp.js +1 -1
  178. package/dist/x/callProp.min.js +1 -1
  179. package/dist/x/callProp.mjs +1 -1
  180. package/dist/x/defaultsDeep.es.js +1 -1
  181. package/dist/x/defaultsDeep.es.min.js +1 -1
  182. package/dist/x/defaultsDeep.js +1 -1
  183. package/dist/x/defaultsDeep.min.js +1 -1
  184. package/dist/x/defaultsDeep.mjs +1 -1
  185. package/dist/x/differenceWith.es.js +1 -1
  186. package/dist/x/differenceWith.es.min.js +1 -1
  187. package/dist/x/differenceWith.js +1 -1
  188. package/dist/x/differenceWith.min.js +1 -1
  189. package/dist/x/differenceWith.mjs +1 -1
  190. package/dist/x/filterOut.es.js +1 -1
  191. package/dist/x/filterOut.es.min.js +1 -1
  192. package/dist/x/filterOut.js +1 -1
  193. package/dist/x/filterOut.min.js +1 -1
  194. package/dist/x/filterOut.mjs +1 -1
  195. package/dist/x/find.es.js +1 -1
  196. package/dist/x/find.es.min.js +1 -1
  197. package/dist/x/find.js +1 -1
  198. package/dist/x/find.min.js +1 -1
  199. package/dist/x/find.mjs +1 -1
  200. package/dist/x/findIndex.es.js +1 -1
  201. package/dist/x/findIndex.es.min.js +1 -1
  202. package/dist/x/findIndex.js +1 -1
  203. package/dist/x/findIndex.min.js +1 -1
  204. package/dist/x/findIndex.mjs +1 -1
  205. package/dist/x/first.es.js +1 -1
  206. package/dist/x/first.es.min.js +1 -1
  207. package/dist/x/first.js +1 -1
  208. package/dist/x/first.min.js +1 -1
  209. package/dist/x/first.mjs +1 -1
  210. package/dist/x/flatten.es.js +1 -1
  211. package/dist/x/flatten.es.min.js +1 -1
  212. package/dist/x/flatten.js +1 -1
  213. package/dist/x/flatten.min.js +1 -1
  214. package/dist/x/flatten.mjs +1 -1
  215. package/dist/x/groupBy.es.js +1 -1
  216. package/dist/x/groupBy.es.min.js +1 -1
  217. package/dist/x/groupBy.js +1 -1
  218. package/dist/x/groupBy.min.js +1 -1
  219. package/dist/x/groupBy.mjs +1 -1
  220. package/dist/x/has.es.js +1 -1
  221. package/dist/x/has.es.min.js +1 -1
  222. package/dist/x/has.js +1 -1
  223. package/dist/x/has.min.js +1 -1
  224. package/dist/x/has.mjs +1 -1
  225. package/dist/x/identity.es.js +1 -1
  226. package/dist/x/identity.es.min.js +1 -1
  227. package/dist/x/identity.js +1 -1
  228. package/dist/x/identity.min.js +1 -1
  229. package/dist/x/identity.mjs +1 -1
  230. package/dist/x/includes.es.js +1 -1
  231. package/dist/x/includes.es.min.js +1 -1
  232. package/dist/x/includes.js +1 -1
  233. package/dist/x/includes.min.js +1 -1
  234. package/dist/x/includes.mjs +1 -1
  235. package/dist/x/isDeepEqual.es.js +1 -1
  236. package/dist/x/isDeepEqual.es.min.js +1 -1
  237. package/dist/x/isDeepEqual.js +1 -1
  238. package/dist/x/isDeepEqual.min.js +1 -1
  239. package/dist/x/isDeepEqual.mjs +1 -1
  240. package/dist/x/isEmpty.es.js +1 -1
  241. package/dist/x/isEmpty.es.min.js +1 -1
  242. package/dist/x/isEmpty.js +1 -1
  243. package/dist/x/isEmpty.min.js +1 -1
  244. package/dist/x/isEmpty.mjs +1 -1
  245. package/dist/x/isEqual.es.js +1 -1
  246. package/dist/x/isEqual.es.min.js +1 -1
  247. package/dist/x/isEqual.js +1 -1
  248. package/dist/x/isEqual.min.js +1 -1
  249. package/dist/x/isEqual.mjs +1 -1
  250. package/dist/x/isFunction.es.js +1 -1
  251. package/dist/x/isFunction.es.min.js +1 -1
  252. package/dist/x/isFunction.js +1 -1
  253. package/dist/x/isFunction.min.js +1 -1
  254. package/dist/x/isFunction.mjs +1 -1
  255. package/dist/x/isIn.es.js +1 -1
  256. package/dist/x/isIn.es.min.js +1 -1
  257. package/dist/x/isIn.js +1 -1
  258. package/dist/x/isIn.min.js +1 -1
  259. package/dist/x/isIn.mjs +1 -1
  260. package/dist/x/isObject.es.js +1 -1
  261. package/dist/x/isObject.es.min.js +1 -1
  262. package/dist/x/isObject.js +1 -1
  263. package/dist/x/isObject.min.js +1 -1
  264. package/dist/x/isObject.mjs +1 -1
  265. package/dist/x/isString.es.js +1 -1
  266. package/dist/x/isString.es.min.js +1 -1
  267. package/dist/x/isString.js +1 -1
  268. package/dist/x/isString.min.js +1 -1
  269. package/dist/x/isString.mjs +1 -1
  270. package/dist/x/keys.es.js +1 -1
  271. package/dist/x/keys.es.min.js +1 -1
  272. package/dist/x/keys.js +1 -1
  273. package/dist/x/keys.min.js +1 -1
  274. package/dist/x/keys.mjs +1 -1
  275. package/dist/x/last.es.js +1 -1
  276. package/dist/x/last.es.min.js +1 -1
  277. package/dist/x/last.js +1 -1
  278. package/dist/x/last.min.js +1 -1
  279. package/dist/x/last.mjs +1 -1
  280. package/dist/x/maxBy.es.js +1 -1
  281. package/dist/x/maxBy.es.min.js +1 -1
  282. package/dist/x/maxBy.js +1 -1
  283. package/dist/x/maxBy.min.js +1 -1
  284. package/dist/x/maxBy.mjs +1 -1
  285. package/dist/x/noop.es.js +1 -1
  286. package/dist/x/noop.es.min.js +1 -1
  287. package/dist/x/noop.js +1 -1
  288. package/dist/x/noop.min.js +1 -1
  289. package/dist/x/noop.mjs +1 -1
  290. package/dist/x/pluck.es.js +1 -1
  291. package/dist/x/pluck.es.min.js +1 -1
  292. package/dist/x/pluck.js +1 -1
  293. package/dist/x/pluck.min.js +1 -1
  294. package/dist/x/pluck.mjs +1 -1
  295. package/dist/x/prepend.es.js +1 -1
  296. package/dist/x/prepend.es.min.js +1 -1
  297. package/dist/x/prepend.js +1 -1
  298. package/dist/x/prepend.min.js +1 -1
  299. package/dist/x/prepend.mjs +1 -1
  300. package/dist/x/size.es.js +1 -1
  301. package/dist/x/size.es.min.js +1 -1
  302. package/dist/x/size.js +1 -1
  303. package/dist/x/size.min.js +1 -1
  304. package/dist/x/size.mjs +1 -1
  305. package/dist/x/trace.es.js +32 -2
  306. package/dist/x/trace.es.min.js +2 -2
  307. package/dist/x/trace.js +32 -2
  308. package/dist/x/trace.min.js +2 -2
  309. package/dist/x/trace.mjs +32 -2
  310. package/dist/x/unionWith.es.js +1 -1
  311. package/dist/x/unionWith.es.min.js +1 -1
  312. package/dist/x/unionWith.js +1 -1
  313. package/dist/x/unionWith.min.js +1 -1
  314. package/dist/x/unionWith.mjs +1 -1
  315. package/dist/x/uniq.es.js +1 -1
  316. package/dist/x/uniq.es.min.js +1 -1
  317. package/dist/x/uniq.js +1 -1
  318. package/dist/x/uniq.min.js +1 -1
  319. package/dist/x/uniq.mjs +1 -1
  320. package/dist/x/unless.es.js +1 -1
  321. package/dist/x/unless.es.min.js +1 -1
  322. package/dist/x/unless.js +1 -1
  323. package/dist/x/unless.min.js +1 -1
  324. package/dist/x/unless.mjs +1 -1
  325. package/dist/x/values.es.js +1 -1
  326. package/dist/x/values.es.min.js +1 -1
  327. package/dist/x/values.js +1 -1
  328. package/dist/x/values.min.js +1 -1
  329. package/dist/x/values.mjs +1 -1
  330. package/dist/x/when.es.js +1 -1
  331. package/dist/x/when.es.min.js +1 -1
  332. package/dist/x/when.js +1 -1
  333. package/dist/x/when.min.js +1 -1
  334. package/dist/x/when.mjs +1 -1
  335. package/es.js +57 -46
  336. package/index.js +57 -46
  337. package/package.json +43 -2
  338. package/tap.js +15 -4
  339. package/.eslintignore +0 -5
  340. package/.eslintrc.js +0 -330
  341. package/.github/workflows/nodejs.yml +0 -27
  342. package/.vscode/launch.json +0 -25
  343. package/AggregateReducer.test.js +0 -82
  344. package/CHANGELOG.md +0 -310
  345. package/CNAME +0 -1
  346. package/CODE_OF_CONDUCT.md +0 -128
  347. package/CONTRIBUTING.md +0 -4
  348. package/Transducer.test.js +0 -154
  349. package/_config.yml +0 -1
  350. package/_internal/improvedGenericTransform.js +0 -93
  351. package/archive/FlatMappingIterator-2020-09-28.js +0 -68
  352. package/archive/_Promise-2023-05-29.js +0 -93
  353. package/archive/arrayMap2-2023-05-29.js +0 -73
  354. package/archive/benchmarks-v1.9.7/all.js +0 -34
  355. package/archive/benchmarks-v1.9.7/and.js +0 -24
  356. package/archive/benchmarks-v1.9.7/any.js +0 -32
  357. package/archive/benchmarks-v1.9.7/assign.js +0 -174
  358. package/archive/benchmarks-v1.9.7/curry.js +0 -55
  359. package/archive/benchmarks-v1.9.7/eq.js +0 -25
  360. package/archive/benchmarks-v1.9.7/filter.js +0 -1322
  361. package/archive/benchmarks-v1.9.7/flatMap.js +0 -48
  362. package/archive/benchmarks-v1.9.7/forEach.js +0 -33
  363. package/archive/benchmarks-v1.9.7/fork.js +0 -123
  364. package/archive/benchmarks-v1.9.7/get.js +0 -44
  365. package/archive/benchmarks-v1.9.7/gt.js +0 -25
  366. package/archive/benchmarks-v1.9.7/gte.js +0 -25
  367. package/archive/benchmarks-v1.9.7/integration.js +0 -88
  368. package/archive/benchmarks-v1.9.7/lt.js +0 -25
  369. package/archive/benchmarks-v1.9.7/lte.js +0 -25
  370. package/archive/benchmarks-v1.9.7/map.js +0 -892
  371. package/archive/benchmarks-v1.9.7/misc.js +0 -470
  372. package/archive/benchmarks-v1.9.7/omit.js +0 -28
  373. package/archive/benchmarks-v1.9.7/or.js +0 -51
  374. package/archive/benchmarks-v1.9.7/pick.js +0 -24
  375. package/archive/benchmarks-v1.9.7/pipe.js +0 -152
  376. package/archive/benchmarks-v1.9.7/reduce.js +0 -739
  377. package/archive/benchmarks-v1.9.7/switchCase.js +0 -256
  378. package/archive/benchmarks-v1.9.7/tap.js +0 -90
  379. package/archive/benchmarks-v1.9.7/transform.js +0 -218
  380. package/archive/benchmarks-v1.9.7/tryCatch.js +0 -108
  381. package/archive/curry.js +0 -13
  382. package/archive/examples-v1.6.11/browserModule.html +0 -31
  383. package/archive/examples-v1.6.11/browserScript.html +0 -32
  384. package/archive/examples-v1.6.11/coolTransformToConsole.js +0 -1
  385. package/archive/examples-v1.6.11/denoLargeGasMap.js +0 -85
  386. package/archive/examples-v1.6.11/denoServer.js +0 -9
  387. package/archive/examples-v1.6.11/denoServerWithMiddleware.js +0 -55
  388. package/archive/examples-v1.6.11/logTodosRange.js +0 -21
  389. package/archive/examples-v1.6.11/makeARequest.html +0 -46
  390. package/archive/examples-v1.6.11/nodeComplexTransformation.js +0 -106
  391. package/archive/examples-v1.6.11/nodeConditionallyExtractIDs.js +0 -50
  392. package/archive/examples-v1.6.11/nodeFloatingPoint.js +0 -55
  393. package/archive/examples-v1.6.11/nodeGetAllJiraBoards.js +0 -45
  394. package/archive/examples-v1.6.11/nodeGetSocketIOClientsTotalCount.js +0 -34
  395. package/archive/examples-v1.6.11/nodeKafkaConsumer.js +0 -63
  396. package/archive/examples-v1.6.11/nodeMakeMultipleRequests.js +0 -55
  397. package/archive/examples-v1.6.11/nodeOnRecordAddTask.js +0 -34
  398. package/archive/examples-v1.6.11/nodePostRequestWithAuth.js +0 -36
  399. package/archive/examples-v1.6.11/nodeSpeedbackMatchmakingAlgorithm.js +0 -96
  400. package/archive/examples-v1.6.11/nodeTireData.js +0 -36
  401. package/archive/examples-v1.6.11/nodeTripleMap.js +0 -85
  402. package/archive/examples-v1.6.11/squaredOdds.ts +0 -16
  403. package/archive/examples-v1.6.11/transducerMaxBuyer.js +0 -67
  404. package/archive/examples-v1.6.11/transformLogTodosRange.js +0 -31
  405. package/archive/examples-v1.6.11/transformStreamRandomInts.js +0 -19
  406. package/archive/genericReduceConcurrent.js +0 -277
  407. package/archive/index.v0.2.9.js +0 -1685
  408. package/archive/objectValuesGenerator.js +0 -13
  409. package/archive/test.v0.2.9.js +0 -2334
  410. package/bench +0 -65
  411. package/benchmark-output/v1.9.7 +0 -268
  412. package/benchmarks/all.async.js +0 -43
  413. package/benchmarks/all.js +0 -43
  414. package/benchmarks/always.js +0 -15
  415. package/benchmarks/and.async.js +0 -25
  416. package/benchmarks/and.js +0 -25
  417. package/benchmarks/assign.async.js +0 -27
  418. package/benchmarks/assign.js +0 -27
  419. package/benchmarks/curry.js +0 -35
  420. package/benchmarks/eq.async.js +0 -23
  421. package/benchmarks/eq.js +0 -23
  422. package/benchmarks/every.async.js +0 -19
  423. package/benchmarks/every.js +0 -19
  424. package/benchmarks/filter.async.js +0 -32
  425. package/benchmarks/filter.js +0 -38
  426. package/benchmarks/flatMap.async.js +0 -26
  427. package/benchmarks/flatMap.js +0 -38
  428. package/benchmarks/get.async.js +0 -19
  429. package/benchmarks/get.js +0 -39
  430. package/benchmarks/gt.async.js +0 -23
  431. package/benchmarks/gt.js +0 -23
  432. package/benchmarks/gte.async.js +0 -23
  433. package/benchmarks/gte.js +0 -23
  434. package/benchmarks/lt.async.js +0 -23
  435. package/benchmarks/lt.js +0 -23
  436. package/benchmarks/lte.async.js +0 -23
  437. package/benchmarks/lte.js +0 -23
  438. package/benchmarks/map.async.js +0 -43
  439. package/benchmarks/map.js +0 -40
  440. package/benchmarks/misc/Promise.js +0 -26
  441. package/benchmarks/misc/isPromise.js +0 -30
  442. package/benchmarks/misc/promiseAll.js +0 -36
  443. package/benchmarks/not.js +0 -23
  444. package/benchmarks/omit.js +0 -38
  445. package/benchmarks/or.async.js +0 -25
  446. package/benchmarks/or.js +0 -25
  447. package/benchmarks/pick.js +0 -38
  448. package/benchmarks/pipe.async.js +0 -47
  449. package/benchmarks/pipe.js +0 -47
  450. package/benchmarks/reduce.async.js +0 -32
  451. package/benchmarks/reduce.js +0 -38
  452. package/benchmarks/set.async.js +0 -19
  453. package/benchmarks/set.js +0 -41
  454. package/benchmarks/some.async.js +0 -19
  455. package/benchmarks/some.js +0 -19
  456. package/benchmarks/switchCase.async.js +0 -27
  457. package/benchmarks/switchCase.js +0 -55
  458. package/benchmarks/tap.js +0 -15
  459. package/benchmarks/thunkify.js +0 -15
  460. package/benchmarks/transform.async.js +0 -27
  461. package/benchmarks/transform.js +0 -40
  462. package/benchmarks/tryCatch.async.js +0 -25
  463. package/benchmarks/tryCatch.js +0 -32
  464. package/build +0 -472
  465. package/dist-test.js +0 -37
  466. package/examples/type-to-search-wiki/README.md +0 -19
  467. package/examples/type-to-search-wiki/package.json +0 -13
  468. package/examples/type-to-search-wiki/src/app.js +0 -46
  469. package/examples/type-to-search-wiki/src/index.html +0 -18
  470. package/import-test.html +0 -73
  471. package/memory-usage/reduce.js +0 -40
  472. package/monad/AsyncPool.js +0 -0
  473. package/monad/BrokenPromise.js +0 -63
  474. package/monad/BrokenPromise.test.js +0 -22
  475. package/monad/Cancellable.js +0 -84
  476. package/monad/Cancellable.memoryUsage.js +0 -60
  477. package/monad/Cancellable.test.js +0 -20
  478. package/monad/Function.js +0 -0
  479. package/monad/Instance.benchmark.js +0 -378
  480. package/monad/Instance.js +0 -351
  481. package/monad/Instance.test.js +0 -445
  482. package/monad/Mux.benchmark.js +0 -29
  483. package/monad/Mux.js +0 -589
  484. package/monad/Mux.test.js +0 -512
  485. package/monad/PossiblePromise.benchmark.js +0 -87
  486. package/monad/PossiblePromise.js +0 -144
  487. package/monad/PossiblePromise.test.js +0 -89
  488. package/monad/README.md +0 -75
  489. package/monad/Reducer.js +0 -0
  490. package/monad/Sequence.benchmark.js +0 -42
  491. package/monad/Sequence.js +0 -36
  492. package/monad/SpecScript.js +0 -0
  493. package/monad/Stack.js +0 -0
  494. package/monad/Struct.benchmark.js +0 -154
  495. package/monad/Struct.js +0 -249
  496. package/monad/Struct.test.js +0 -237
  497. package/rubico.js +0 -66
  498. package/test.js +0 -4242
  499. package/tmp.js +0 -1
package/monad/Mux.js DELETED
@@ -1,589 +0,0 @@
1
- /* rubico v1.5.0
2
- * https://github.com/a-synchronous/rubico
3
- * (c) 2019-2020 Richard Tong
4
- * rubico may be freely distributed under the MIT license.
5
- */
6
-
7
- 'use strict'
8
-
9
- const Instance = require('./Instance')
10
-
11
- const { isArray, isObject, isSet, isIterable, isAsyncIterable, isFunction } = Instance
12
-
13
- const objectProto = Object.prototype
14
-
15
- const nativeObjectToString = objectProto.toString
16
-
17
- const objectToString = value => nativeObjectToString.call(value)
18
-
19
- const symbolIterator = Symbol.iterator
20
-
21
- const symbolAsyncIterator = Symbol.asyncIterator
22
-
23
- const generatorFunctionTag = '[object GeneratorFunction]'
24
-
25
- const asyncGeneratorFunctionTag = '[object AsyncGeneratorFunction]'
26
-
27
- const promiseRace = Promise.race.bind(Promise)
28
-
29
- /**
30
- * @synopsis
31
- * isGeneratorFunction(value !null) -> boolean
32
- */
33
- const isGeneratorFunction = value => {
34
- const tag = objectToString(value)
35
- return tag == generatorFunctionTag || tag == asyncGeneratorFunctionTag
36
- }
37
-
38
- /**
39
- * @synopsis
40
- * isSequence(value any) -> boolean
41
- */
42
- const isSequence = value => value != null
43
- && (typeof value[symbolIterator] == 'function'
44
- || typeof value[symbolAsyncIterator] == 'function'
45
- || isGeneratorFunction(value))
46
-
47
- /**
48
- * @synopsis
49
- * isAsyncSequence(value any) -> boolean
50
- */
51
- const isAsyncSequence = value => value != null
52
- && (typeof value[symbolAsyncIterator] == 'function'
53
- || objectToString(value) == asyncGeneratorFunctionTag)
54
-
55
- /**
56
- * @name Mux
57
- *
58
- * @synopsis
59
- * Iterable|GeneratorFunction -> SyncSequence
60
- * AsyncIterable|AsyncGeneratorFunction -> AsyncSequence
61
- * SyncSequence|AsyncSequence -> Sequence
62
- *
63
- * <T any>new Mux(Sequence<Sequence<T>|T>|T) -> Mux
64
- *
65
- * @catchphrase
66
- * Multiplexing for Sequences of Sequences
67
- *
68
- * @WARNING
69
- * Iterators have defined a self-referencing Symbol.iterator, which means they'll check out as Iterables but will deplete prematurely. Supplying a direct Iterator as the top level sequence in any capacity to Mux will cause undesirable behavior.
70
- */
71
- const Mux = function(x) {
72
- if (!isSequence(x)) {
73
- throw new TypeError(`${x} is not a Sequence`)
74
- }
75
- this.value = x
76
- }
77
-
78
- /**
79
- * @name Mux.isSequence
80
- *
81
- * @synopsis
82
- * Mux.isSequence(x any) -> boolean
83
- *
84
- * @catchphrase
85
- * Tell if Sequence
86
- *
87
- * @description
88
- * Mux.isSequence takes anything and returns a Boolean value. Mux.isSequence returns true if the value is an Iterable, GeneratorFunction, AsyncIterable, or AsyncGeneratorFunction.
89
- *
90
- * @example
91
- * console.log(
92
- * Mux.isSequence([[1], [2], [3]]),
93
- * ) // true
94
- */
95
- Mux.isSequence = isSequence
96
-
97
- /**
98
- * @name iteratorOf
99
- *
100
- * @synopsis
101
- * <T any>iteratorOf(x T) -> Iterator<T>
102
- */
103
- const iteratorOf = x => [x][symbolIterator]()
104
-
105
- /**
106
- * @name getSyncIterator
107
- *
108
- * @synopsis
109
- * Iterable|GeneratorFunction -> SyncSequence
110
- *
111
- * <T any>getSyncIterator(x SyncSequence<T>|T) -> Iterator<T>
112
- */
113
- const getSyncIterator = x => (x[symbolIterator] ? x[symbolIterator]()
114
- : isFunction(x) ? x() : iteratorOf(x))
115
-
116
- /**
117
- * @name getIterator
118
- *
119
- * @synopsis
120
- * Iterable|GeneratorFunction
121
- * |AsyncIterable|AsyncGeneratorFunction -> Sequence
122
- *
123
- * <T any>getIterator(x Sequence<T>|T) -> Iterator<T>|AsyncIterator<T>
124
- */
125
- const getIterator = x => {
126
- if (x[symbolIterator]) return x[symbolIterator]()
127
- if (x[symbolAsyncIterator]) return x[symbolAsyncIterator]()
128
- if (isFunction(x)) return x()
129
- return iteratorOf(x)
130
- }
131
-
132
- /**
133
- * @name sequenceIsAsync
134
- *
135
- * @synopsis
136
- * Iterable|GeneratorFunction
137
- * |AsyncIterable|AsyncGeneratorFunction -> Sequence
138
- *
139
- * sequenceIsAsync(x Sequence) -> boolean
140
- */
141
- const sequenceIsAsync = x => (
142
- x[symbolAsyncIterator] || objectToString(x) == asyncGeneratorFunctionTag)
143
-
144
- /**
145
- * @name muxIsSync
146
- *
147
- * @synopsis
148
- * Iterable|GeneratorFunction
149
- * |AsyncIterable|AsyncGeneratorFunction -> Sequence
150
- *
151
- * <T any>muxIsSync(x Sequence<Sequence<T>|T>) -> boolean
152
- */
153
- const muxIsSync = x => {
154
- if (sequenceIsAsync(x)) return false
155
- for (const xi of getSyncIterator(x)) {
156
- if (sequenceIsAsync(xi)) return false
157
- }
158
- return true
159
- }
160
-
161
- /**
162
- * @name muxZipSync
163
- *
164
- * @synopsis
165
- * Iterable|GeneratorFunction -> SyncSequence
166
- *
167
- * <T any>muxZipSync(
168
- * x SyncSequence<SyncSequence<T>|T>|T,
169
- * ) -> Iterator<Array<T|undefined>>
170
- */
171
- const muxZipSync = function*(x) {
172
- const iterators = []
173
- for (const xi of getSyncIterator(x)) {
174
- iterators.push(isSequence(xi) ? getSyncIterator(xi) : iteratorOf(xi))
175
- }
176
- const iteratorsLength = iterators.length
177
- while (true) {
178
- const zippedRow = []
179
- let numDone = 0
180
- for (const iter of iterators) {
181
- const { value, done } = iter.next()
182
- zippedRow.push(value)
183
- if (done) numDone += 1
184
- }
185
- if (numDone == iteratorsLength) return
186
- yield zippedRow
187
- }
188
- }
189
-
190
- const promiseAll = Promise.all.bind(Promise)
191
-
192
- /**
193
- * @name muxZipAsync
194
- *
195
- * @synopsis
196
- * Iterable|GeneratorFunction
197
- * |AsyncIterable|AsyncGeneratorFunction -> Sequence
198
- *
199
- * <T any>muxZipAsync(
200
- * x Sequence<Sequence<T>|T>|T,
201
- * ) -> AsyncIterator<Array<T|undefined>>
202
- */
203
- const muxZipAsync = async function*(x) {
204
- const iterators = []
205
- for await (const xi of getIterator(x)) {
206
- iterators.push(isSequence(xi) ? getIterator(xi) : iteratorOf(xi))
207
- }
208
- const iteratorsLength = iterators.length
209
- const iteratorsMap = iterators.map.bind(iterators)
210
- while (true) {
211
- let numDone = 0
212
- const zippedRow = await promiseAll(iteratorsMap(async iter => {
213
- const { value, done } = await iter.next()
214
- if (done) numDone += 1
215
- return value
216
- }))
217
- if (numDone == iteratorsLength) return
218
- yield zippedRow
219
- }
220
- }
221
-
222
- /**
223
- * @name
224
- * Mux.zip
225
- *
226
- * @synopsis
227
- * Iterable|GeneratorFunction -> SyncSequence
228
- * AsyncIterable|AsyncGeneratorFunction -> AsyncSequence
229
- * SyncSequence|AsyncSequence -> Sequence
230
- *
231
- * <T any>Mux.zip(
232
- * x SyncSequence<SyncSequence<T>|T>|T,
233
- * ) -> Iterator<Array<T|undefined>>
234
- *
235
- * <T any>Mux.zip(
236
- * x Sequence<Sequence<T>|T>|T,
237
- * ) -> AsyncIterator<Array<T|undefined>>
238
- *
239
- * @catchphrase
240
- * Create rows from disparate Sequences
241
- *
242
- * @description
243
- * Mux.zip takes a Sequence of items or Sequences of items and outputs either an Iterator or an AsyncIterator that yields an Array of items of each supplied Sequence for a given iteration. If any Sequence supplied to Mux.zip is AsyncIterable or an AsyncGeneratorFunction, Mux.zip outputs an AsyncIterator. The Iterator or AsyncIterator will iterate as long as the longest iterator of the supplied Sequences; shorter iterators will yield undefined until the longest iterator is consumed.
244
- *
245
- * @example
246
- * const iterator = Mux.zip([[1, 2, 3], ['a', 'b', 'c']])
247
- *
248
- * for (const item of iterator) {
249
- * console.log(item) // [1, 'a']
250
- * // [2, 'b']
251
- * // [3, 'c']
252
- * }
253
- */
254
- Mux.zip = x => muxIsSync(x) ? muxZipSync(x) : muxZipAsync(x)
255
-
256
- /**
257
- * @name muxConcatSync
258
- *
259
- * @synopsis
260
- * Iterable|GeneratorFunction -> SyncSequence
261
- *
262
- * <T any>muxConcatSync(
263
- * x SyncSequence<SyncSequence<T>|T>|T,
264
- * ) -> Iterator<T>
265
- */
266
- const muxConcatSync = function*(x) {
267
- for (const xi of getSyncIterator(x)) {
268
- isSequence(xi) ? yield* getSyncIterator(xi) : yield xi
269
- }
270
- }
271
-
272
- /**
273
- * @name muxConcatAsync
274
- *
275
- * @synopsis
276
- * Iterable|GeneratorFunction -> SyncSequence
277
- * AsyncIterable|AsyncGeneratorFunction -> AsyncSequence
278
- * SyncSequence|AsyncSequence -> Sequence
279
- *
280
- * <T any>muxConcatAsync(
281
- * x Sequence<Sequence<T>|T>|T,
282
- * ) -> AsyncIterator<T>
283
- */
284
- const muxConcatAsync = async function*(x) {
285
- for await (const xi of getIterator(x)) {
286
- isSequence(xi) ? yield* getIterator(xi) : yield xi
287
- }
288
- }
289
-
290
- /**
291
- * @name Mux.concat
292
- *
293
- * @synopsis
294
- * Iterable|GeneratorFunction -> SyncSequence
295
- * AsyncIterable|AsyncGeneratorFunction -> AsyncSequence
296
- * SyncSequence|AsyncSequence -> Sequence
297
- *
298
- * <T any>Mux.concat(
299
- * x SyncSequence<SyncSequence<T>|T>|T,
300
- * ) -> Iterator<T>
301
- *
302
- * <T any>Mux.concat(
303
- * x Sequence<Sequence<T>|T>|T,
304
- * ) -> AsyncIterator<T>
305
- *
306
- * @catchphrase
307
- * Concatenate Sequences into one
308
- *
309
- * @description
310
- * Mux.concat takes a Sequence of items or Sequences of items and outputs either an Iterator or an AsyncIterator that yields each item individually. The first of these items is the first item of the first Sequence, the next is the second item of the first Sequence, and so on until all Sequences have been iterated in order. Non-Sequence Items in the top-level Sequence are yielded as they are.
311
- *
312
- * @example
313
- * const iter = Mux.concat([
314
- * [1, 2, 3],
315
- * [4, 5, 6],
316
- * [7, 8, 9],
317
- * ])
318
- *
319
- * for (const number of iter) {
320
- * console.log(number) // 1 2 3 4 5 6 7 8 9
321
- * }
322
- */
323
- Mux.concat = x => muxIsSync(x) ? muxConcatSync(x) : muxConcatAsync(x)
324
-
325
- /**
326
- * @name muxSwitchSync
327
- *
328
- * @synopsis
329
- * <T any>muxSwitchSync(
330
- * x SyncSequence<SyncSequence<T>|T>|T,
331
- * ) -> Iterator<T>
332
- */
333
- const muxSwitchSync = function*(x) {
334
- const iterators = []
335
- for (const xi of getSyncIterator(x)) {
336
- iterators.push(isSequence(xi) ? getSyncIterator(xi) : iteratorOf(xi))
337
- }
338
- const iteratorsLength = iterators.length
339
- while (true) {
340
- let numDone = 0
341
- for (const iter of iterators) {
342
- const { value, done } = iter.next()
343
- if (done) { numDone += 1; continue }
344
- yield value
345
- }
346
- if (numDone == iteratorsLength) return
347
- }
348
- }
349
-
350
- /**
351
- * @name muxSwitchAsync
352
- *
353
- * @synopsis
354
- * Iterable|GeneratorFunction -> SyncSequence
355
- * AsyncIterable|AsyncGeneratorFunction -> AsyncSequence
356
- * SyncSequence|AsyncSequence -> Sequence
357
- *
358
- * <T any>muxSwitchAsync(
359
- * x Sequence<Sequence<T>|T>|T,
360
- * ) -> AsyncIterator<T>
361
- */
362
- const muxSwitchAsync = async function*(x) {
363
- const iterators = []
364
- for await (const xi of getIterator(x)) {
365
- iterators.push(isSequence(xi) ? getIterator(xi) : iteratorOf(xi))
366
- }
367
- const iteratorsLength = iterators.length
368
- while (true) {
369
- let numDone = 0
370
- for (const iter of iterators) {
371
- const { value, done } = await iter.next()
372
- if (done) { numDone += 1; continue }
373
- yield value
374
- }
375
- if (numDone == iteratorsLength) return
376
- }
377
- }
378
-
379
- /**
380
- * @name Mux.switch
381
- *
382
- * @synopsis
383
- * Iterable|GeneratorFunction -> SyncSequence
384
- * AsyncIterable|AsyncGeneratorFunction -> AsyncSequence
385
- * SyncSequence|AsyncSequence -> Sequence
386
- *
387
- * <T any>Mux.switch(
388
- * x SyncSequence<SyncSequence<T>|T>|T,
389
- * ) -> Iterator<T>
390
- *
391
- * <T any>Mux.switch(
392
- * x Sequence<Sequence<T>|T>|T,
393
- * ) -> AsyncIterator<T>
394
- *
395
- * @catchphrase
396
- * Interleave Sequences into one
397
- *
398
- * @description
399
- * Mux.switch takes a Sequence of items or Sequences of items and outputs either an Iterator or an AsyncIterator that yields each item individually. The first of these items is the first item of the first Sequence, the next is the first item of the second Sequence, and so on until all Sequences have yielded their first item. Then, the first Sequence yields its second item, the second Sequence yields its second item, and so on until all Sequences have finished iterating. Non-Sequence Items in the top-level Sequence are yielded as they are. When a shorter Sequence finishes iterating, the remaining Sequences will switch yielding amongst themselves.
400
- *
401
- * @example
402
- * const iter = Mux.switch([
403
- * [1, 1, 1],
404
- * [2, 2, 2],
405
- * [3, 3, 3],
406
- * ])
407
- * for (const number of iter) {
408
- * console.log(number) // 1 2 3 1 2 3 1 2 3
409
- * }
410
- */
411
- Mux.switch = x => muxIsSync(x) ? muxSwitchSync(x) : muxSwitchAsync(x)
412
-
413
- /**
414
- * @name muxRaceAsync
415
- *
416
- * @synopsis
417
- * <T any>muxRaceAsync(x Sequence<Sequence<T>|T>|T) -> AsyncIterator<T>
418
- */
419
- const muxRaceAsync = async function*(x) {
420
- const promises = new Set()
421
- for await (const xi of getIterator(x)) {
422
- if (isAsyncSequence(xi)) {
423
- const iter = getIterator(xi)
424
- const p = iter.next().then(res => [p, iter, res])
425
- promises.add(p)
426
- } else {
427
- yield* getIterator(xi)
428
- }
429
- }
430
- while (promises.size > 0) {
431
- const [prevP, iter, { value, done }] = await promiseRace(promises)
432
- promises.delete(prevP)
433
- if (done) continue
434
- const p = iter.next().then(res => [p, iter, res])
435
- promises.add(p)
436
- yield value
437
- }
438
- }
439
-
440
- /**
441
- * @name Mux.race
442
- *
443
- * @synopsis
444
- * Iterable|GeneratorFunction -> SyncSequence
445
- * AsyncIterable|AsyncGeneratorFunction -> AsyncSequence
446
- * SyncSequence|AsyncSequence -> Sequence
447
- *
448
- * <T any>Mux.race(
449
- * x SyncSequence<SyncSequence<T>|T>T,
450
- * ) -> Iterator<T>
451
- *
452
- * <T any>Mux.race(
453
- * x Sequence<Sequence<T>|T>T,
454
- * ) -> AsyncIterator<T>
455
- *
456
- * @catchphrase
457
- * Asynchronously Race Sequences into one
458
- *
459
- * @description
460
- * Mux.race takes a Sequence of items or Sequences of items and outputs either an Iterator or an AsyncIterator that yields each item individually. The first of these items are the synchronous items of the top level Sequence, followed by the asynchronous items of any asynchronous sub Sequences. If any sub Sequences are asynchronous, the order of these asynchronous items in the final returned AsyncIterator is determined by the serial asynchronous resolution of the individual asynchronous sub Sequences. If all Sequences are synchronous, Mux.race behaves just as Mux.concat.
461
- *
462
- * @example
463
- * const f = async function*() { await delay(5); yield 10; yield 20 }
464
- * const g = async function*() { yield 1; yield 2; yield 3; await delay(10); yield 30 }
465
- *
466
- * const iter = Mux.race([f, g])
467
- *
468
- * for await (const number of iter) {
469
- * console.log(number) // 1 2 3 10 20 30
470
- * }
471
- */
472
- Mux.race = x => muxIsSync(x) ? muxConcatSync(x) : muxRaceAsync(x)
473
-
474
- /**
475
- * @name arrayPushArray
476
- *
477
- * @synopsis
478
- * arrayPushArray(x Array, array Array) -> undefined
479
- */
480
- const arrayPushArray = (x, array) => {
481
- const offset = x.length, length = array.length
482
- let i = -1
483
- while (++i < length) {
484
- x[offset + i] = array[i]
485
- }
486
- }
487
-
488
- /**
489
- * @name arrayPushIterable
490
- *
491
- * @synopsis
492
- * arrayPushIterable(x Array, array Array) -> undefined
493
- */
494
- const arrayPushIterable = (x, iterable) => {
495
- const offset = x.length
496
- let i = 0
497
- for (const value of iterable) {
498
- x[offset + i] = value
499
- i += 1
500
- }
501
- }
502
-
503
- /**
504
- * @name arrayFlatten
505
- *
506
- * @synopsis
507
- * <T any>arrayFlatten(Array<Array<T>|T>) -> Array<T>
508
- */
509
- const arrayFlatten = x => {
510
- const y = []
511
- for (const xi of x) {
512
- (isArray(xi) ? arrayPushArray(y, xi) :
513
- isIterable(xi) ? arrayPushIterable(y, xi) : y.push(xi))
514
- }
515
- return y
516
- }
517
-
518
- /*
519
- * @name genericFlatten
520
- *
521
- * @synopsis
522
- * <T any>genericFlatten(
523
- * method string,
524
- * y Set<>,
525
- * x Iterable<Iterable<T>|T>,
526
- * ) -> Set<T>
527
- */
528
- const genericFlatten = (method, y, x) => {
529
- const add = y[method].bind(y)
530
- for (const xi of x) {
531
- if (isIterable(xi)) {
532
- for (const v of xi) add(v)
533
- } else {
534
- add(xi)
535
- }
536
- }
537
- return y
538
- }
539
-
540
- const muxConcat = Mux.concat
541
-
542
- /**
543
- * @name Mux.flatten
544
- *
545
- * @synopsis
546
- * <T any>Mux.flatten(x Array<Iterable<T>|T>) -> Array<T>
547
- *
548
- * <T any>Mux.flatten(x Set<Iterable<T>|T>) -> Set<T>
549
- *
550
- * <T !Array|!Set>Mux.flatten(x T) -> Mux.concat(x)
551
- *
552
- * @name Mux.flatten
553
- *
554
- * @synopsis
555
- * Iterable|GeneratorFunction -> SyncSequence
556
- * AsyncIterable|AsyncGeneratorFunction -> AsyncSequence
557
- * SyncSequence|AsyncSequence -> Sequence
558
- *
559
- * <T any>Mux.race(
560
- * x SyncSequence<SyncSequence<T>|T>,
561
- * ) -> Iterator<T>
562
- *
563
- * <T any>Mux.race(
564
- * x Sequence<Sequence<T>|T>,
565
- * ) -> AsyncIterator<T>
566
- *
567
- * @catchphrase
568
- * Asynchronously Race Sequences into one
569
- *
570
- * @description
571
- * Mux.flatten behaves just as Mux.concat except for cases when passed an Array or Set. When passed an Array, Mux.flatten outputs another Array with all elements of the input Array concatenated. When passed a Set, Mux.flatten outputs another Set in the same regard.
572
- *
573
- * @example
574
- * console.log(
575
- * Mux.flatten([[1], 2, [3], 4, [5]]),
576
- * ) // [1, 2, 3, 4, 5]
577
- */
578
- Mux.flatten = x => {
579
- if (isArray(x)) return arrayFlatten(x)
580
- if (isSet(x)) return genericFlatten('add', new Set(), x)
581
- return muxConcat(x)
582
- }
583
-
584
- // Mux.flatten = x => genericFlatten('push', [], x)
585
-
586
- /* Mux.flatten = x => (
587
- isArray(x) ? genericFlatten('push', [], x) : genericFlatten('add', new Set(), x)) */
588
-
589
- module.exports = Mux