rubico 2.7.6 → 2.7.8

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 (377) hide show
  1. package/README.md +12 -16
  2. package/dist/Transducer.es.js +2 -2
  3. package/dist/Transducer.es.min.js +2 -2
  4. package/dist/Transducer.js +2 -2
  5. package/dist/Transducer.min.js +2 -2
  6. package/dist/Transducer.mjs +2 -2
  7. package/dist/__.es.js +2 -2
  8. package/dist/__.es.min.js +2 -2
  9. package/dist/__.js +2 -2
  10. package/dist/__.min.js +2 -2
  11. package/dist/__.mjs +2 -2
  12. package/dist/all.es.js +2 -2
  13. package/dist/all.es.min.js +2 -2
  14. package/dist/all.js +2 -2
  15. package/dist/all.min.js +2 -2
  16. package/dist/all.mjs +2 -2
  17. package/dist/always.es.js +2 -2
  18. package/dist/always.es.min.js +2 -2
  19. package/dist/always.js +2 -2
  20. package/dist/always.min.js +2 -2
  21. package/dist/always.mjs +2 -2
  22. package/dist/and.es.js +2 -2
  23. package/dist/and.es.min.js +2 -2
  24. package/dist/and.js +2 -2
  25. package/dist/and.min.js +2 -2
  26. package/dist/and.mjs +2 -2
  27. package/dist/assign.es.js +2 -2
  28. package/dist/assign.es.min.js +2 -2
  29. package/dist/assign.js +2 -2
  30. package/dist/assign.min.js +2 -2
  31. package/dist/assign.mjs +2 -2
  32. package/dist/compose.es.js +2 -2
  33. package/dist/compose.es.min.js +2 -2
  34. package/dist/compose.js +2 -2
  35. package/dist/compose.min.js +2 -2
  36. package/dist/compose.mjs +2 -2
  37. package/dist/curry.es.js +2 -2
  38. package/dist/curry.es.min.js +2 -2
  39. package/dist/curry.js +2 -2
  40. package/dist/curry.min.js +2 -2
  41. package/dist/curry.mjs +2 -2
  42. package/dist/eq.es.js +2 -2
  43. package/dist/eq.es.min.js +2 -2
  44. package/dist/eq.js +2 -2
  45. package/dist/eq.min.js +2 -2
  46. package/dist/eq.mjs +2 -2
  47. package/dist/every.es.js +2 -2
  48. package/dist/every.es.min.js +2 -2
  49. package/dist/every.js +2 -2
  50. package/dist/every.min.js +2 -2
  51. package/dist/every.mjs +2 -2
  52. package/dist/filter.es.js +2 -2
  53. package/dist/filter.es.min.js +2 -2
  54. package/dist/filter.js +2 -2
  55. package/dist/filter.min.js +2 -2
  56. package/dist/filter.mjs +2 -2
  57. package/dist/flatMap.es.js +2 -2
  58. package/dist/flatMap.es.min.js +2 -2
  59. package/dist/flatMap.js +2 -2
  60. package/dist/flatMap.min.js +2 -2
  61. package/dist/flatMap.mjs +2 -2
  62. package/dist/forEach.es.js +2 -2
  63. package/dist/forEach.es.min.js +2 -2
  64. package/dist/forEach.js +2 -2
  65. package/dist/forEach.min.js +2 -2
  66. package/dist/forEach.mjs +2 -2
  67. package/dist/get.es.js +2 -2
  68. package/dist/get.es.min.js +2 -2
  69. package/dist/get.js +2 -2
  70. package/dist/get.min.js +2 -2
  71. package/dist/get.mjs +2 -2
  72. package/dist/gt.es.js +2 -2
  73. package/dist/gt.es.min.js +2 -2
  74. package/dist/gt.js +2 -2
  75. package/dist/gt.min.js +2 -2
  76. package/dist/gt.mjs +2 -2
  77. package/dist/gte.es.js +2 -2
  78. package/dist/gte.es.min.js +2 -2
  79. package/dist/gte.js +2 -2
  80. package/dist/gte.min.js +2 -2
  81. package/dist/gte.mjs +2 -2
  82. package/dist/lt.es.js +2 -2
  83. package/dist/lt.es.min.js +2 -2
  84. package/dist/lt.js +2 -2
  85. package/dist/lt.min.js +2 -2
  86. package/dist/lt.mjs +2 -2
  87. package/dist/lte.es.js +2 -2
  88. package/dist/lte.es.min.js +2 -2
  89. package/dist/lte.js +2 -2
  90. package/dist/lte.min.js +2 -2
  91. package/dist/lte.mjs +2 -2
  92. package/dist/map.es.js +2 -2
  93. package/dist/map.es.min.js +2 -2
  94. package/dist/map.js +2 -2
  95. package/dist/map.min.js +2 -2
  96. package/dist/map.mjs +2 -2
  97. package/dist/not.es.js +2 -2
  98. package/dist/not.es.min.js +2 -2
  99. package/dist/not.js +2 -2
  100. package/dist/not.min.js +2 -2
  101. package/dist/not.mjs +2 -2
  102. package/dist/omit.es.js +2 -2
  103. package/dist/omit.es.min.js +2 -2
  104. package/dist/omit.js +2 -2
  105. package/dist/omit.min.js +2 -2
  106. package/dist/omit.mjs +2 -2
  107. package/dist/or.es.js +2 -2
  108. package/dist/or.es.min.js +2 -2
  109. package/dist/or.js +2 -2
  110. package/dist/or.min.js +2 -2
  111. package/dist/or.mjs +2 -2
  112. package/dist/pick.es.js +2 -2
  113. package/dist/pick.es.min.js +2 -2
  114. package/dist/pick.js +2 -2
  115. package/dist/pick.min.js +2 -2
  116. package/dist/pick.mjs +2 -2
  117. package/dist/pipe.es.js +2 -2
  118. package/dist/pipe.es.min.js +2 -2
  119. package/dist/pipe.js +2 -2
  120. package/dist/pipe.min.js +2 -2
  121. package/dist/pipe.mjs +2 -2
  122. package/dist/reduce.es.js +2 -2
  123. package/dist/reduce.es.min.js +2 -2
  124. package/dist/reduce.js +2 -2
  125. package/dist/reduce.min.js +2 -2
  126. package/dist/reduce.mjs +2 -2
  127. package/dist/rubico.es.js +2 -2
  128. package/dist/rubico.es.min.js +2 -2
  129. package/dist/rubico.global.js +2 -2
  130. package/dist/rubico.global.min.js +2 -2
  131. package/dist/rubico.js +2 -2
  132. package/dist/rubico.min.js +2 -2
  133. package/dist/rubico.mjs +2 -2
  134. package/dist/set.es.js +2 -2
  135. package/dist/set.es.min.js +2 -2
  136. package/dist/set.js +2 -2
  137. package/dist/set.min.js +2 -2
  138. package/dist/set.mjs +2 -2
  139. package/dist/some.es.js +2 -2
  140. package/dist/some.es.min.js +2 -2
  141. package/dist/some.js +2 -2
  142. package/dist/some.min.js +2 -2
  143. package/dist/some.mjs +2 -2
  144. package/dist/switchCase.es.js +2 -2
  145. package/dist/switchCase.es.min.js +2 -2
  146. package/dist/switchCase.js +2 -2
  147. package/dist/switchCase.min.js +2 -2
  148. package/dist/switchCase.mjs +2 -2
  149. package/dist/tap.es.js +2 -2
  150. package/dist/tap.es.min.js +2 -2
  151. package/dist/tap.js +2 -2
  152. package/dist/tap.min.js +2 -2
  153. package/dist/tap.mjs +2 -2
  154. package/dist/thunkify.es.js +2 -2
  155. package/dist/thunkify.es.min.js +2 -2
  156. package/dist/thunkify.js +2 -2
  157. package/dist/thunkify.min.js +2 -2
  158. package/dist/thunkify.mjs +2 -2
  159. package/dist/transform.es.js +2 -2
  160. package/dist/transform.es.min.js +2 -2
  161. package/dist/transform.js +2 -2
  162. package/dist/transform.min.js +2 -2
  163. package/dist/transform.mjs +2 -2
  164. package/dist/tryCatch.es.js +2 -2
  165. package/dist/tryCatch.es.min.js +2 -2
  166. package/dist/tryCatch.js +2 -2
  167. package/dist/tryCatch.min.js +2 -2
  168. package/dist/tryCatch.mjs +2 -2
  169. package/dist/x/append.es.js +2 -2
  170. package/dist/x/append.es.min.js +2 -2
  171. package/dist/x/append.js +2 -2
  172. package/dist/x/append.min.js +2 -2
  173. package/dist/x/append.mjs +2 -2
  174. package/dist/x/callProp.es.js +2 -2
  175. package/dist/x/callProp.es.min.js +2 -2
  176. package/dist/x/callProp.js +2 -2
  177. package/dist/x/callProp.min.js +2 -2
  178. package/dist/x/callProp.mjs +2 -2
  179. package/dist/x/defaultsDeep.es.js +2 -2
  180. package/dist/x/defaultsDeep.es.min.js +2 -2
  181. package/dist/x/defaultsDeep.js +2 -2
  182. package/dist/x/defaultsDeep.min.js +2 -2
  183. package/dist/x/defaultsDeep.mjs +2 -2
  184. package/dist/x/differenceWith.es.js +2 -2
  185. package/dist/x/differenceWith.es.min.js +2 -2
  186. package/dist/x/differenceWith.js +2 -2
  187. package/dist/x/differenceWith.min.js +2 -2
  188. package/dist/x/differenceWith.mjs +2 -2
  189. package/dist/x/filterOut.es.js +2 -2
  190. package/dist/x/filterOut.es.min.js +2 -2
  191. package/dist/x/filterOut.js +2 -2
  192. package/dist/x/filterOut.min.js +2 -2
  193. package/dist/x/filterOut.mjs +2 -2
  194. package/dist/x/find.es.js +2 -2
  195. package/dist/x/find.es.min.js +2 -2
  196. package/dist/x/find.js +2 -2
  197. package/dist/x/find.min.js +2 -2
  198. package/dist/x/find.mjs +2 -2
  199. package/dist/x/findIndex.es.js +2 -2
  200. package/dist/x/findIndex.es.min.js +2 -2
  201. package/dist/x/findIndex.js +2 -2
  202. package/dist/x/findIndex.min.js +2 -2
  203. package/dist/x/findIndex.mjs +2 -2
  204. package/dist/x/first.es.js +2 -2
  205. package/dist/x/first.es.min.js +2 -2
  206. package/dist/x/first.js +2 -2
  207. package/dist/x/first.min.js +2 -2
  208. package/dist/x/first.mjs +2 -2
  209. package/dist/x/flatten.es.js +2 -2
  210. package/dist/x/flatten.es.min.js +2 -2
  211. package/dist/x/flatten.js +2 -2
  212. package/dist/x/flatten.min.js +2 -2
  213. package/dist/x/flatten.mjs +2 -2
  214. package/dist/x/groupBy.es.js +2 -2
  215. package/dist/x/groupBy.es.min.js +2 -2
  216. package/dist/x/groupBy.js +2 -2
  217. package/dist/x/groupBy.min.js +2 -2
  218. package/dist/x/groupBy.mjs +2 -2
  219. package/dist/x/has.es.js +2 -2
  220. package/dist/x/has.es.min.js +2 -2
  221. package/dist/x/has.js +2 -2
  222. package/dist/x/has.min.js +2 -2
  223. package/dist/x/has.mjs +2 -2
  224. package/dist/x/identity.es.js +2 -2
  225. package/dist/x/identity.es.min.js +2 -2
  226. package/dist/x/identity.js +2 -2
  227. package/dist/x/identity.min.js +2 -2
  228. package/dist/x/identity.mjs +2 -2
  229. package/dist/x/includes.es.js +2 -2
  230. package/dist/x/includes.es.min.js +2 -2
  231. package/dist/x/includes.js +2 -2
  232. package/dist/x/includes.min.js +2 -2
  233. package/dist/x/includes.mjs +2 -2
  234. package/dist/x/isDeepEqual.es.js +2 -2
  235. package/dist/x/isDeepEqual.es.min.js +2 -2
  236. package/dist/x/isDeepEqual.js +2 -2
  237. package/dist/x/isDeepEqual.min.js +2 -2
  238. package/dist/x/isDeepEqual.mjs +2 -2
  239. package/dist/x/isEmpty.es.js +2 -2
  240. package/dist/x/isEmpty.es.min.js +2 -2
  241. package/dist/x/isEmpty.js +2 -2
  242. package/dist/x/isEmpty.min.js +2 -2
  243. package/dist/x/isEmpty.mjs +2 -2
  244. package/dist/x/isEqual.es.js +2 -2
  245. package/dist/x/isEqual.es.min.js +2 -2
  246. package/dist/x/isEqual.js +2 -2
  247. package/dist/x/isEqual.min.js +2 -2
  248. package/dist/x/isEqual.mjs +2 -2
  249. package/dist/x/isFunction.es.js +2 -2
  250. package/dist/x/isFunction.es.min.js +2 -2
  251. package/dist/x/isFunction.js +2 -2
  252. package/dist/x/isFunction.min.js +2 -2
  253. package/dist/x/isFunction.mjs +2 -2
  254. package/dist/x/isIn.es.js +2 -2
  255. package/dist/x/isIn.es.min.js +2 -2
  256. package/dist/x/isIn.js +2 -2
  257. package/dist/x/isIn.min.js +2 -2
  258. package/dist/x/isIn.mjs +2 -2
  259. package/dist/x/isObject.es.js +2 -2
  260. package/dist/x/isObject.es.min.js +2 -2
  261. package/dist/x/isObject.js +2 -2
  262. package/dist/x/isObject.min.js +2 -2
  263. package/dist/x/isObject.mjs +2 -2
  264. package/dist/x/isString.es.js +2 -2
  265. package/dist/x/isString.es.min.js +2 -2
  266. package/dist/x/isString.js +2 -2
  267. package/dist/x/isString.min.js +2 -2
  268. package/dist/x/isString.mjs +2 -2
  269. package/dist/x/keys.es.js +2 -2
  270. package/dist/x/keys.es.min.js +2 -2
  271. package/dist/x/keys.js +2 -2
  272. package/dist/x/keys.min.js +2 -2
  273. package/dist/x/keys.mjs +2 -2
  274. package/dist/x/last.es.js +2 -2
  275. package/dist/x/last.es.min.js +2 -2
  276. package/dist/x/last.js +2 -2
  277. package/dist/x/last.min.js +2 -2
  278. package/dist/x/last.mjs +2 -2
  279. package/dist/x/maxBy.es.js +2 -2
  280. package/dist/x/maxBy.es.min.js +2 -2
  281. package/dist/x/maxBy.js +2 -2
  282. package/dist/x/maxBy.min.js +2 -2
  283. package/dist/x/maxBy.mjs +2 -2
  284. package/dist/x/noop.es.js +2 -2
  285. package/dist/x/noop.es.min.js +2 -2
  286. package/dist/x/noop.js +2 -2
  287. package/dist/x/noop.min.js +2 -2
  288. package/dist/x/noop.mjs +2 -2
  289. package/dist/x/pluck.es.js +2 -2
  290. package/dist/x/pluck.es.min.js +2 -2
  291. package/dist/x/pluck.js +2 -2
  292. package/dist/x/pluck.min.js +2 -2
  293. package/dist/x/pluck.mjs +2 -2
  294. package/dist/x/prepend.es.js +2 -2
  295. package/dist/x/prepend.es.min.js +2 -2
  296. package/dist/x/prepend.js +2 -2
  297. package/dist/x/prepend.min.js +2 -2
  298. package/dist/x/prepend.mjs +2 -2
  299. package/dist/x/size.es.js +2 -2
  300. package/dist/x/size.es.min.js +2 -2
  301. package/dist/x/size.js +2 -2
  302. package/dist/x/size.min.js +2 -2
  303. package/dist/x/size.mjs +2 -2
  304. package/dist/x/trace.es.js +2 -2
  305. package/dist/x/trace.es.min.js +2 -2
  306. package/dist/x/trace.js +2 -2
  307. package/dist/x/trace.min.js +2 -2
  308. package/dist/x/trace.mjs +2 -2
  309. package/dist/x/unionWith.es.js +2 -2
  310. package/dist/x/unionWith.es.min.js +2 -2
  311. package/dist/x/unionWith.js +2 -2
  312. package/dist/x/unionWith.min.js +2 -2
  313. package/dist/x/unionWith.mjs +2 -2
  314. package/dist/x/uniq.es.js +2 -2
  315. package/dist/x/uniq.es.min.js +2 -2
  316. package/dist/x/uniq.js +2 -2
  317. package/dist/x/uniq.min.js +2 -2
  318. package/dist/x/uniq.mjs +2 -2
  319. package/dist/x/unless.es.js +2 -2
  320. package/dist/x/unless.es.min.js +2 -2
  321. package/dist/x/unless.js +2 -2
  322. package/dist/x/unless.min.js +2 -2
  323. package/dist/x/unless.mjs +2 -2
  324. package/dist/x/values.es.js +2 -2
  325. package/dist/x/values.es.min.js +2 -2
  326. package/dist/x/values.js +2 -2
  327. package/dist/x/values.min.js +2 -2
  328. package/dist/x/values.mjs +2 -2
  329. package/dist/x/when.es.js +2 -2
  330. package/dist/x/when.es.min.js +2 -2
  331. package/dist/x/when.js +2 -2
  332. package/dist/x/when.min.js +2 -2
  333. package/dist/x/when.mjs +2 -2
  334. package/es.js +2 -2
  335. package/flatMap.js +1 -1
  336. package/index.js +2 -2
  337. package/package.json +3 -10
  338. package/x/append.d.ts +0 -38
  339. package/x/callProp.d.ts +0 -20
  340. package/x/defaultsDeep.d.ts +0 -42
  341. package/x/differenceWith.d.ts +0 -25
  342. package/x/filterOut.d.ts +0 -39
  343. package/x/find.d.ts +0 -34
  344. package/x/findIndex.d.ts +0 -25
  345. package/x/first.d.ts +0 -23
  346. package/x/flatten.d.ts +0 -57
  347. package/x/groupBy.d.ts +0 -50
  348. package/x/has.d.ts +0 -25
  349. package/x/heapUsedInLoop.d.ts +0 -53
  350. package/x/identity.d.ts +0 -21
  351. package/x/includes.d.ts +0 -25
  352. package/x/index.d.ts +0 -34
  353. package/x/is.d.ts +0 -2
  354. package/x/isDeepEqual.d.ts +0 -42
  355. package/x/isEmpty.d.ts +0 -24
  356. package/x/isEqual.d.ts +0 -2
  357. package/x/isFunction.d.ts +0 -23
  358. package/x/isIn.d.ts +0 -61
  359. package/x/isObject.d.ts +0 -2
  360. package/x/isString.benchmarks.d.ts +0 -1
  361. package/x/isString.d.ts +0 -21
  362. package/x/keys.d.ts +0 -23
  363. package/x/last.d.ts +0 -22
  364. package/x/maxBy.d.ts +0 -41
  365. package/x/noop.d.ts +0 -21
  366. package/x/pluck.d.ts +0 -35
  367. package/x/prepend.d.ts +0 -38
  368. package/x/size.d.ts +0 -21
  369. package/x/test.d.ts +0 -1
  370. package/x/timeInLoop.d.ts +0 -21
  371. package/x/trace.d.ts +0 -30
  372. package/x/tracef.d.ts +0 -7
  373. package/x/unionWith.d.ts +0 -31
  374. package/x/uniq.d.ts +0 -24
  375. package/x/unless.d.ts +0 -28
  376. package/x/values.d.ts +0 -23
  377. package/x/when.d.ts +0 -28
package/x/find.d.ts DELETED
@@ -1,34 +0,0 @@
1
- export = find;
2
- /**
3
- * @name find
4
- *
5
- * @synopsis
6
- * ```coffeescript [specscript]
7
- * Foldable<T> = Iterable<T>|AsyncIterable<T>|{ reduce: (any, T)=>any }|Object<T>
8
- *
9
- * var T any,
10
- * predicate T=>Promise|boolean,
11
- * foldable Foldable<T>,
12
- * result Promise|T|undefined
13
- *
14
- * find(predicate)(foldable) -> result
15
- * ```
16
- *
17
- * @description
18
- * Get the first element in a foldable collection that matches a predicate.
19
- *
20
- * ```javascript [playground]
21
- * import find from 'https://unpkg.com/rubico/dist/x/find.es.js'
22
- *
23
- * const users = [
24
- * { name: 'John', age: 16 },
25
- * { name: 'Jill', age: 32 },
26
- * { name: 'John', age: 51 },
27
- * ]
28
- *
29
- * console.log(
30
- * find(user => user.age > 50)(users),
31
- * ) // { name: 'John', age: 51 }
32
- * ```
33
- */
34
- declare function find(predicate: any): (value: any) => any;
package/x/findIndex.d.ts DELETED
@@ -1,25 +0,0 @@
1
- export = findIndex;
2
- /**
3
- * @name findIndex
4
- *
5
- * @synopsis
6
- * ```coffeescript [specscript]
7
- * findIndex(predicate function)(array Array) -> index Promise|number
8
- * ```
9
- *
10
- * @description
11
- * Returns the index of the first element in an array that satisfies the predicate. Returns -1 if no element satisfies the predicate.
12
- *
13
- * ```javascript [playground]
14
- * import findIndex from 'https://unpkg.com/rubico/dist/x/findIndex.es.js'
15
- *
16
- * const oddNumberIndex = findIndex(function isOdd(number) {
17
- * return number % 2 == 1
18
- * })([2, 3, 5])
19
- *
20
- * console.log(oddNumberIndex) // 1
21
- * ```
22
- *
23
- * @since 1.6.26
24
- */
25
- declare function findIndex(predicate: any): (array: any) => any;
package/x/first.d.ts DELETED
@@ -1,23 +0,0 @@
1
- export = first;
2
- /**
3
- * @name first
4
- *
5
- * @synopsis
6
- * ```coffeescript [specscript]
7
- * var value Array|string
8
- *
9
- * first(value) -> any
10
- * ```
11
- *
12
- * @description
13
- * Get the first element of a collection
14
- *
15
- * ```javascript [playground]
16
- * import first from 'https://unpkg.com/rubico/dist/x/first.es.js'
17
- *
18
- * console.log(first([1, 2, 3])) // 1
19
- * console.log(first('abc')) // 'a'
20
- * console.log(first([])) // undefined
21
- * ```
22
- */
23
- declare function first(value: any): any;
package/x/flatten.d.ts DELETED
@@ -1,57 +0,0 @@
1
- export = flatten;
2
- /**
3
- * @name flatten
4
- *
5
- * @synopsis
6
- * ```coffeescript [specscript]
7
- * Stream<T> = { read: ()=>T, write: T=>() }
8
- * Monad<T> = Array<T>|String<T>|Set<T>
9
- * |TypedArray<T>|Stream<T>|Iterator<T>|AsyncIterator<T>
10
- * |{ chain: T=>Monad<T> }|{ flatMap: T=>Monad<T> }|Object<T>
11
- * Reducer<T> = (any, T)=>Promise|any
12
- * Foldable<T> = Iterable<T>|AsyncIterable<T>|{ reduce: Reducer<T>=>any }|Object<T>
13
- *
14
- * var T any,
15
- * monad Monad<Monad<T>|Foldable<T>|T>,
16
- * args ...any,
17
- * generatorFunction ...args=>Generator<Monad<T>|Foldable<T>|T>,
18
- * asyncGeneratorFunction ...args=>AsyncGenerator<Monad<T>|Foldable<T>|T>,
19
- * reducer Reducer<Monad<T>|Foldable<T>|T>
20
- *
21
- * flatten(monad) -> Monad<T>
22
- *
23
- * flatten(generatorFunction) -> ...args=>Generator<T>
24
- *
25
- * flatten(asyncGeneratorFunction) -> ...args=>AsyncGenerator<T>
26
- *
27
- * flatten(reducer) -> Reducer<T>
28
- * ```
29
- *
30
- * @description
31
- * Flatten a collection. Works in transducer position.
32
- *
33
- * ```javascript [playground]
34
- * import flatten from 'https://unpkg.com/rubico/dist/x/flatten.es.js'
35
- *
36
- * flatten([
37
- * [1, 1],
38
- * new Set([2, 2]),
39
- * (function* () { yield 3; yield 3 })(),
40
- * (async function* () { yield 4; yield 4 })(),
41
- * { a: 5, b: 5 },
42
- * 6,
43
- * Promise.resolve(7),
44
- * new Uint8Array([8]),
45
- * ]).then(console.log)
46
- * // [1, 1, 2, 3, 3, 5, 5, 6, 7, 8, 4, 4]
47
- *
48
- * const add = (a, b) => a + b
49
- *
50
- * console.log(
51
- * [[1], [2], [3], [4], [5]].reduce(flatten(add), 0),
52
- * ) // 15
53
- * ```
54
- *
55
- * @TODO flatten for each type
56
- */
57
- declare function flatten(value: any): any;
package/x/groupBy.d.ts DELETED
@@ -1,50 +0,0 @@
1
- export = groupBy;
2
- /**
3
- * @name groupBy
4
- *
5
- * @synopsis
6
- * ```coffeescript [specscript]
7
- * Reducer<T> = (any, T)=>Promise|any
8
- * Foldable<T> = Iterable<T>|AsyncIterable<T>|{ reduce: Reducer<T>=>any }|Object<T>
9
- *
10
- * var property any,
11
- * resolver any=>Promise|any,
12
- * value Foldable
13
- *
14
- * groupBy(property)(value) -> groupedByProperty Map<any=>Array>
15
- *
16
- * groupBy(resolver)(value) -> groupedByResolver Promise|Map<any=>Array>
17
- * ```
18
- *
19
- * @description
20
- * Group a foldable collection into a Map of arrays by a property on each of its elements.
21
- *
22
- * ```javascript [playground]
23
- * import groupBy from 'https://unpkg.com/rubico/dist/x/groupBy.es.js'
24
- *
25
- * console.log(
26
- * groupBy('age')([
27
- * { name: 'John', age: 22 },
28
- * { name: 'Jane', age: 22 },
29
- * { name: 'Henry', age: 23 },
30
- * ]),
31
- * )
32
- * // Map {
33
- * // 22 => [{ name: 'John', age: 22 }, { name: 'Jane', age: 22 }],
34
- * // 23 => [{ name: 'Henry', age: 23 }],
35
- * // }
36
- * ```
37
- *
38
- * Additionally, pass a resolver in property position to resolve a value for group membership for each element.
39
- *
40
- * ```javascript [playground]
41
- * import groupBy from 'https://unpkg.com/rubico/dist/x/groupBy.es.js'
42
- *
43
- * console.log(
44
- * groupBy(
45
- * word => word.toLowerCase(),
46
- * )(['Hello', 'hello', 'Hey']),
47
- * ) // Map { 'hello' => ['Hello', 'hello'], 'hey' => ['Hey'] }
48
- * ```
49
- */
50
- declare function groupBy(propertyOrResolver: any): any;
package/x/has.d.ts DELETED
@@ -1,25 +0,0 @@
1
- export = has;
2
- /**
3
- * @name has
4
- *
5
- * @synopsis
6
- * ```coffeescript [specscript]
7
- * has(key any)(container Set|Map|{ has: function }|Object) -> Promise|boolean
8
- * ```
9
- *
10
- * @description
11
- * Check if a collection has a key.
12
- *
13
- * ```javascript [playground]
14
- * import has from 'https://unpkg.com/rubico/dist/x/has.es.js'
15
- *
16
- * console.log(
17
- * has('a')({ a: 1, b: 2, c: 3 }),
18
- * ) // true
19
- *
20
- * console.log(
21
- * has('a')({}),
22
- * ) // false
23
- * ```
24
- */
25
- declare function has(key: any): (container: any) => any;
@@ -1,53 +0,0 @@
1
- export = heapUsedInLoop;
2
- /**
3
- * @name heapUsedInLoop
4
- *
5
- * @catchphrase
6
- * max and avg heap used in loop
7
- *
8
- * @synopsis
9
- * heapUsedInLoop(
10
- * desc string,
11
- * loopCount number,
12
- * func (loop number)=>any
13
- * ) -> ()
14
- *
15
- * @description
16
- * **heapUsedInLoop** is a memory usage measurement function. Supply `description`, `loopCount`, and a function `func` for that function to be run `loopCount` times, finally logging average and max heap used per loop in terms of megabytes MiB.
17
- *
18
- * ```javascript
19
- * heapUsedInLoop('my-description', 1e5, function () {
20
- * return 1 + 1
21
- * }) /*
22
- * 0 5.88 MiB
23
- * 1 5.92 MiB
24
- * ...
25
- * 99997 7.34 MiB
26
- * 99998 7.34 MiB
27
- * 99999 7.35 MiB
28
- * my-description: 1e+5: {
29
- * "max": "7.15 MiB",
30
- * "avg": "5.50 MiB"
31
- * }
32
- * ```
33
- *
34
- * @node-only
35
- */
36
- declare function heapUsedInLoop(desc: any, loopCount: any, func: any): void;
37
- declare namespace heapUsedInLoop {
38
- function skip(): void;
39
- /**
40
- * @name heapUsedInLoop.async
41
- *
42
- * @synopsis
43
- * heapUsedInLoop.async(
44
- * desc string,
45
- * loopCount number,
46
- * func (loop number)=>Promise|any
47
- * ) -> ()
48
- */
49
- function async(desc: any, loopCount: any, func: any): Promise<void>;
50
- namespace async {
51
- function skip(): void;
52
- }
53
- }
package/x/identity.d.ts DELETED
@@ -1,21 +0,0 @@
1
- export = identity;
2
- /**
3
- * @name identity
4
- *
5
- * @synopsis
6
- * ```coffeescript [specscript]
7
- * identity(value any) -> value
8
- * ```
9
- *
10
- * @description
11
- * Pass a value and receive the same value back.
12
- *
13
- * ```javascript [playground]
14
- * import identity from 'https://unpkg.com/rubico/dist/x/identity.es.js'
15
- *
16
- * console.log(
17
- * identity(1),
18
- * ) // 1
19
- * ```
20
- */
21
- declare function identity(value: any): any;
package/x/includes.d.ts DELETED
@@ -1,25 +0,0 @@
1
- export = includes;
2
- /**
3
- * @name includes
4
- *
5
- * @synopsis
6
- * ```coffeescript [specscript]
7
- * includes(value any)(container Array|String|Object) -> boolean
8
- * ```
9
- *
10
- * @description
11
- * Check if a collection includes another value by [SameValueZero](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero).
12
- *
13
- * ```javascript [playground]
14
- * import includes from 'https://unpkg.com/rubico/dist/x/includes.es.js'
15
- *
16
- * console.log(
17
- * includes(5)([1, 2, 3, 4, 5])
18
- * ) // true
19
- *
20
- * console.log(
21
- * includes(5)([1, 2, 3])
22
- * ) // false
23
- * ```
24
- */
25
- declare function includes(value: any): (container: any) => any;
package/x/index.d.ts DELETED
@@ -1,34 +0,0 @@
1
- import append = require("./append");
2
- import callProp = require("./callProp");
3
- import defaultsDeep = require("./defaultsDeep");
4
- import differenceWith = require("./differenceWith");
5
- import filterOut = require("./filterOut");
6
- import find = require("./find");
7
- import findIndex = require("./findIndex");
8
- import first = require("./first");
9
- import flatten = require("./flatten");
10
- import groupBy = require("./groupBy");
11
- import has = require("./has");
12
- import identity = require("./identity");
13
- import includes = require("./includes");
14
- import isDeepEqual = require("./isDeepEqual");
15
- import isEmpty = require("./isEmpty");
16
- import isEqual = require("./isEqual");
17
- import isFunction = require("./isFunction");
18
- import isObject = require("../_internal/isObject");
19
- import isString = require("./isString");
20
- import keys = require("./keys");
21
- import last = require("./last");
22
- import maxBy = require("./maxBy");
23
- import noop = require("./noop");
24
- import pluck = require("./pluck");
25
- import prepend = require("./prepend");
26
- import size = require("./size");
27
- import trace = require("./trace");
28
- import unionWith = require("./unionWith");
29
- import uniq = require("./uniq");
30
- import unless = require("./unless");
31
- import values = require("./values");
32
- import when = require("./when");
33
- import isIn = require("./isIn");
34
- export { append, callProp, defaultsDeep, differenceWith, filterOut, find, findIndex, first, flatten, groupBy, has, identity, includes, isDeepEqual, isEmpty, isEqual, isFunction, isObject, isString, keys, last, maxBy, noop, pluck, prepend, size, trace, unionWith, uniq, unless, values, when, isIn };
package/x/is.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export = is;
2
- declare function is(constructor: any): (x: any) => boolean;
@@ -1,42 +0,0 @@
1
- export = isDeepEqual;
2
- /**
3
- * @name isDeepEqual
4
- *
5
- * @synopsis
6
- * ```coffeescript [specscript]
7
- * Nested<T> = Array<Array<T>|Object<T>|Iterable<T>|T>|Object<Array<T>|Object<T>|Iterable<T>|T>
8
- *
9
- * var left Nested,
10
- * right Nested
11
- *
12
- * isDeepEqual(left, right) -> boolean
13
- * ```
14
- *
15
- * @description
16
- * Check two values for deep [SameValueZero](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) equality.
17
- *
18
- * ```javascript [playground]
19
- * import isDeepEqual from 'https://unpkg.com/rubico/dist/x/isDeepEqual.es.js'
20
- *
21
- * console.log(
22
- * isDeepEqual({ a: 1, b: 2, c: [3] }, { a: 1, b: 2, c: [3] }),
23
- * ) // true
24
- *
25
- * console.log(
26
- * isDeepEqual({ a: 1, b: 2, c: [3] }, { a: 1, b: 2, c: [5] }),
27
- * ) // false
28
- * ```
29
- *
30
- * When passed a resolver function as the left or right argument or resolvers as both arguments, returns a function that resolves the value by the resolver before performing the deep equal comparison.
31
- *
32
- * ```javascript [playground]
33
- * import isDeepEqual from 'https://unpkg.com/rubico/dist/x/isDeepEqual.es.js'
34
- *
35
- * const isPropADeepEqualTo123Array = isDeepEqual(object => object.a, [1, 2, 3])
36
- *
37
- * console.log(
38
- * isPropADeepEqualTo123Array({ a: [1, 2, 3] }),
39
- * ) // true
40
- * ```
41
- */
42
- declare function isDeepEqual(left: any, right: any): any;
package/x/isEmpty.d.ts DELETED
@@ -1,24 +0,0 @@
1
- export = isEmpty;
2
- /**
3
- * @name isEmpty
4
- *
5
- * @synopsis
6
- * ```coffeescript [specscript]
7
- * isEmpty(value any) -> boolean
8
- * ```
9
- *
10
- * @description
11
- * Check if a value is empty.
12
- *
13
- * ```javascript [playground]
14
- * import isEmpty from 'https://unpkg.com/rubico/dist/x/isEmpty.es.js'
15
- *
16
- * console.log('', isEmpty('')) // true
17
- * console.log([], isEmpty([])) // true
18
- * console.log({}, isEmpty({})) // true
19
- * console.log([1, 2, 3], isEmpty([1, 2, 3])) // false
20
- * console.log(new Set([1, 2, 3]), isEmpty(new Set([1, 2, 3]))) // false
21
- * console.log({ a: 1, b: 2, c: 3 }, isEmpty({ a: 1, b: 2, c: 3 })) // false
22
- * ```
23
- */
24
- declare function isEmpty(value: any): boolean;
package/x/isEqual.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export = isEqual;
2
- declare function isEqual(a: any, b: any): boolean;
package/x/isFunction.d.ts DELETED
@@ -1,23 +0,0 @@
1
- export = isFunction;
2
- /**
3
- * @name isFunction
4
- *
5
- * @synopsis
6
- * ```coffeescript [specscript]
7
- * isFunction(value any) -> boolean
8
- * ```
9
- *
10
- * @description
11
- * Determine whether a value is a function.
12
- *
13
- * ```javascript [playground]
14
- * import isFunction from 'https://unpkg.com/rubico/dist/x/isFunction.es.js'
15
- *
16
- * const add = (a, b) => a + b
17
- *
18
- * console.log(
19
- * isFunction(add),
20
- * ) // true
21
- * ```
22
- */
23
- declare function isFunction(value: any): boolean;
package/x/isIn.d.ts DELETED
@@ -1,61 +0,0 @@
1
- export = isIn;
2
- /**
3
- * @name isIn
4
- *
5
- * @synopsis
6
- * ```coffeescript [specscript]
7
- * isIn(container Array|Object|String|Set|Map)(value any) -> boolean
8
- * ```
9
- *
10
- * @description
11
- * Counterpart to includes. Check if a collection includes another value.
12
- *
13
- * ```javascript [playground]
14
- * import isIn from 'https://unpkg.com/rubico/dist/x/isIn.es.js'
15
- *
16
- * console.log(
17
- * isIn([1, 2, 3](1)
18
- * ) // true
19
- *
20
- * console.log(
21
- * isIn([1, 2, 3](4)
22
- * ) // false
23
- *
24
- * console.log(
25
- * isIn({ a: 1 })(1)
26
- * ) // true
27
- *
28
- * console.log(
29
- * isIn({ a: 1 })(2)
30
- * ) // true
31
- *
32
- * console.log(
33
- * isIn('abc')('a')
34
- * ) // true
35
- *
36
- * console.log(
37
- * isIn('abc')('ab')
38
- * ) // true
39
- *
40
- * console.log(
41
- * isIn('abc')('d')
42
- * ) // false
43
- *
44
- * console.log(
45
- * isIn(new Set([1, 2, 3]))(1)
46
- * ) // true
47
- *
48
- * console.log(
49
- * isIn(new Set([1, 2, 3]))(4)
50
- * ) // false
51
- *
52
- * console.log(
53
- * isIn(new Map([[1, 1], [2, 2], [3, 3]]))(1)
54
- * ) // true
55
- *
56
- * console.log(
57
- * isIn(new Map([[1, 1], [2, 2], [3, 3]]))(4)
58
- * ) // false
59
- * ```
60
- */
61
- declare function isIn(...args: any[]): any;
package/x/isObject.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export = isObject;
2
- import isObject = require("../_internal/isObject");
@@ -1 +0,0 @@
1
- export {};
package/x/isString.d.ts DELETED
@@ -1,21 +0,0 @@
1
- export = isString;
2
- /**
3
- * @name isString
4
- *
5
- * @synopsis
6
- * ```coffeescript [specscript]
7
- * isString(value any) -> boolean
8
- * ```
9
- *
10
- * @description
11
- * Determine whether a value is a string.
12
- *
13
- * ```javascript [playground]
14
- * import isString from 'https://unpkg.com/rubico/dist/x/isString.es.js'
15
- *
16
- * console.log(
17
- * isString('hey'),
18
- * ) // true
19
- * ```
20
- */
21
- declare function isString(value: any): boolean;
package/x/keys.d.ts DELETED
@@ -1,23 +0,0 @@
1
- export = keys;
2
- /**
3
- * @name keys
4
- *
5
- * @synopsis
6
- * ```coffeescript [specscript]
7
- * keys(value string|Array|Set|Map|object) -> Array<key number|string>
8
- * ```
9
- *
10
- * @description
11
- * Get an array of keys from an instance.
12
- *
13
- * ```javascript [playground]
14
- * import keys from 'https://unpkg.com/rubico/dist/x/keys.es.js'
15
- *
16
- * console.log(keys({ a: 1, b: 2, c: 3 })) // ['a', 'b', 'c']
17
- * console.log(keys(['hello', 'world'])) // [0, 1]
18
- * console.log(keys(new Map([['hello', 1], ['world', 2]]))) // ['hello', 'world']
19
- * ```
20
- *
21
- * @since 1.6.25
22
- */
23
- declare function keys(object: any): any[];
package/x/last.d.ts DELETED
@@ -1,22 +0,0 @@
1
- export = last;
2
- /**
3
- * @name last
4
- *
5
- * @synopsis
6
- * ```coffeescript [specscript]
7
- * var value Array|string
8
- *
9
- * last(value) -> any
10
- * ```
11
- *
12
- * @description
13
- * Get the last element of a collection
14
- *
15
- * ```javascript [playground]
16
- * import last from 'https://unpkg.com/rubico/dist/x/last.es.js'
17
- *
18
- * console.log(last([1, 2, 3])) // 3
19
- * console.log(last([])) // undefined
20
- * ```
21
- */
22
- declare function last(value: any): any;
package/x/maxBy.d.ts DELETED
@@ -1,41 +0,0 @@
1
- export = maxBy;
2
- /**
3
- * @name maxBy
4
- *
5
- * @synopsis
6
- * ```coffeescript [specscript]
7
- * maxBy(array Array, path string) -> maxElementByPath any
8
- *
9
- * maxBy(path string)(array Array) -> maxElementByPath any
10
- * ```
11
- *
12
- * @description
13
- * Finds the element that is the max by a property denoted by path.
14
- *
15
- * ```javascript [playground]
16
- * import maxBy from 'https://unpkg.com/rubico/dist/x/maxBy.es.js'
17
- *
18
- * const array = [{ a: 1 }, { a: 2 }, { a: 3 }]
19
- *
20
- * const maxElement = maxBy(array, 'a')
21
- *
22
- * console.log(maxElement) // { a: 3 }
23
- * ```
24
- *
25
- * `maxBy` composes in a lazy way.
26
- *
27
- * ```javascript [playground]
28
- * import maxBy from 'https://unpkg.com/rubico/dist/x/maxBy.es.js'
29
- *
30
- * const numbers = [1, 2, 3]
31
- *
32
- * const maxElement = pipe(numbers, [
33
- * map(number => number ** 2),
34
- * map(number => ({ a: { b: { c: number } } })),
35
- * maxBy('a.b.c')
36
- * ])
37
- *
38
- * console.log(maxElement) // { a: { b: { c: 9 } } }
39
- * ```
40
- */
41
- declare function maxBy(...args: any[]): any;
package/x/noop.d.ts DELETED
@@ -1,21 +0,0 @@
1
- export = noop;
2
- /**
3
- * @name noop
4
- *
5
- * @synopsis
6
- * ```coffeescript [specscript]
7
- * noop() -> undefined
8
- * ```
9
- *
10
- * @description
11
- * Doesn't do anything.
12
- *
13
- * ```javascript [playground]
14
- * import noop from 'https://unpkg.com/rubico/dist/x/noop.es.js'
15
- *
16
- * console.log(
17
- * noop(),
18
- * ) // undefined
19
- * ```
20
- */
21
- declare function noop(): void;