rubico 2.3.0 → 2.3.2

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 (423) hide show
  1. package/AggregateReducer.d.ts +10 -0
  2. package/README.md +9 -0
  3. package/Transducer.d.ts +231 -0
  4. package/__.d.ts +2 -0
  5. package/_internal/EmptyMap.d.ts +2 -0
  6. package/_internal/arrayFind.d.ts +15 -0
  7. package/_internal/arrayMapSeries.js +4 -4
  8. package/_internal/asyncIteratorFind.d.ts +12 -0
  9. package/_internal/findAllFilePaths.js +2 -4
  10. package/_internal/iteratorFind.d.ts +12 -0
  11. package/_internal/thunkify5.d.ts +20 -0
  12. package/_internal/timeInLoop.d.ts +25 -0
  13. package/_internal/timeInLoopAsync.d.ts +23 -0
  14. package/all.d.ts +100 -0
  15. package/always.d.ts +2 -0
  16. package/and.d.ts +45 -0
  17. package/assign.d.ts +46 -0
  18. package/compose.d.ts +25 -0
  19. package/curry.d.ts +70 -0
  20. package/dist/Transducer.es.js +2 -2
  21. package/dist/Transducer.es.min.js +2 -2
  22. package/dist/Transducer.js +2 -2
  23. package/dist/Transducer.min.js +2 -2
  24. package/dist/Transducer.mjs +2 -2
  25. package/dist/__.es.js +2 -2
  26. package/dist/__.es.min.js +2 -2
  27. package/dist/__.js +2 -2
  28. package/dist/__.min.js +2 -2
  29. package/dist/__.mjs +2 -2
  30. package/dist/all.es.js +2 -2
  31. package/dist/all.es.min.js +2 -2
  32. package/dist/all.js +2 -2
  33. package/dist/all.min.js +2 -2
  34. package/dist/all.mjs +2 -2
  35. package/dist/always.es.js +2 -2
  36. package/dist/always.es.min.js +2 -2
  37. package/dist/always.js +2 -2
  38. package/dist/always.min.js +2 -2
  39. package/dist/always.mjs +2 -2
  40. package/dist/and.es.js +2 -2
  41. package/dist/and.es.min.js +2 -2
  42. package/dist/and.js +2 -2
  43. package/dist/and.min.js +2 -2
  44. package/dist/and.mjs +2 -2
  45. package/dist/assign.es.js +2 -2
  46. package/dist/assign.es.min.js +2 -2
  47. package/dist/assign.js +2 -2
  48. package/dist/assign.min.js +2 -2
  49. package/dist/assign.mjs +2 -2
  50. package/dist/compose.es.js +2 -2
  51. package/dist/compose.es.min.js +2 -2
  52. package/dist/compose.js +2 -2
  53. package/dist/compose.min.js +2 -2
  54. package/dist/compose.mjs +2 -2
  55. package/dist/curry.es.js +2 -2
  56. package/dist/curry.es.min.js +2 -2
  57. package/dist/curry.js +2 -2
  58. package/dist/curry.min.js +2 -2
  59. package/dist/curry.mjs +2 -2
  60. package/dist/eq.es.js +2 -2
  61. package/dist/eq.es.min.js +2 -2
  62. package/dist/eq.js +2 -2
  63. package/dist/eq.min.js +2 -2
  64. package/dist/eq.mjs +2 -2
  65. package/dist/every.es.js +2 -2
  66. package/dist/every.es.min.js +2 -2
  67. package/dist/every.js +2 -2
  68. package/dist/every.min.js +2 -2
  69. package/dist/every.mjs +2 -2
  70. package/dist/filter.es.js +2 -2
  71. package/dist/filter.es.min.js +2 -2
  72. package/dist/filter.js +2 -2
  73. package/dist/filter.min.js +2 -2
  74. package/dist/filter.mjs +2 -2
  75. package/dist/flatMap.es.js +2 -2
  76. package/dist/flatMap.es.min.js +2 -2
  77. package/dist/flatMap.js +2 -2
  78. package/dist/flatMap.min.js +2 -2
  79. package/dist/flatMap.mjs +2 -2
  80. package/dist/forEach.es.js +2 -2
  81. package/dist/forEach.es.min.js +2 -2
  82. package/dist/forEach.js +2 -2
  83. package/dist/forEach.min.js +2 -2
  84. package/dist/forEach.mjs +2 -2
  85. package/dist/get.es.js +6 -6
  86. package/dist/get.es.min.js +3 -3
  87. package/dist/get.js +6 -6
  88. package/dist/get.min.js +3 -3
  89. package/dist/get.mjs +6 -6
  90. package/dist/gt.es.js +2 -2
  91. package/dist/gt.es.min.js +2 -2
  92. package/dist/gt.js +2 -2
  93. package/dist/gt.min.js +2 -2
  94. package/dist/gt.mjs +2 -2
  95. package/dist/gte.es.js +2 -2
  96. package/dist/gte.es.min.js +2 -2
  97. package/dist/gte.js +2 -2
  98. package/dist/gte.min.js +2 -2
  99. package/dist/gte.mjs +2 -2
  100. package/dist/lt.es.js +2 -2
  101. package/dist/lt.es.min.js +2 -2
  102. package/dist/lt.js +2 -2
  103. package/dist/lt.min.js +2 -2
  104. package/dist/lt.mjs +2 -2
  105. package/dist/lte.es.js +2 -2
  106. package/dist/lte.es.min.js +2 -2
  107. package/dist/lte.js +2 -2
  108. package/dist/lte.min.js +2 -2
  109. package/dist/lte.mjs +2 -2
  110. package/dist/map.es.js +4 -4
  111. package/dist/map.es.min.js +3 -3
  112. package/dist/map.js +4 -4
  113. package/dist/map.min.js +3 -3
  114. package/dist/map.mjs +4 -4
  115. package/dist/not.es.js +2 -2
  116. package/dist/not.es.min.js +2 -2
  117. package/dist/not.js +2 -2
  118. package/dist/not.min.js +2 -2
  119. package/dist/not.mjs +2 -2
  120. package/dist/omit.es.js +2 -2
  121. package/dist/omit.es.min.js +2 -2
  122. package/dist/omit.js +2 -2
  123. package/dist/omit.min.js +2 -2
  124. package/dist/omit.mjs +2 -2
  125. package/dist/or.es.js +2 -2
  126. package/dist/or.es.min.js +2 -2
  127. package/dist/or.js +2 -2
  128. package/dist/or.min.js +2 -2
  129. package/dist/or.mjs +2 -2
  130. package/dist/pick.es.js +2 -2
  131. package/dist/pick.es.min.js +2 -2
  132. package/dist/pick.js +2 -2
  133. package/dist/pick.min.js +2 -2
  134. package/dist/pick.mjs +2 -2
  135. package/dist/pipe.es.js +2 -2
  136. package/dist/pipe.es.min.js +2 -2
  137. package/dist/pipe.js +2 -2
  138. package/dist/pipe.min.js +2 -2
  139. package/dist/pipe.mjs +2 -2
  140. package/dist/reduce.es.js +2 -2
  141. package/dist/reduce.es.min.js +2 -2
  142. package/dist/reduce.js +2 -2
  143. package/dist/reduce.min.js +2 -2
  144. package/dist/reduce.mjs +2 -2
  145. package/dist/rubico.es.js +8 -8
  146. package/dist/rubico.es.min.js +3 -3
  147. package/dist/rubico.global.js +8 -8
  148. package/dist/rubico.global.min.js +3 -3
  149. package/dist/rubico.js +8 -8
  150. package/dist/rubico.min.js +3 -3
  151. package/dist/rubico.mjs +8 -8
  152. package/dist/set.es.js +2 -2
  153. package/dist/set.es.min.js +2 -2
  154. package/dist/set.js +2 -2
  155. package/dist/set.min.js +2 -2
  156. package/dist/set.mjs +2 -2
  157. package/dist/some.es.js +2 -2
  158. package/dist/some.es.min.js +2 -2
  159. package/dist/some.js +2 -2
  160. package/dist/some.min.js +2 -2
  161. package/dist/some.mjs +2 -2
  162. package/dist/switchCase.es.js +2 -2
  163. package/dist/switchCase.es.min.js +2 -2
  164. package/dist/switchCase.js +2 -2
  165. package/dist/switchCase.min.js +2 -2
  166. package/dist/switchCase.mjs +2 -2
  167. package/dist/tap.es.js +2 -2
  168. package/dist/tap.es.min.js +2 -2
  169. package/dist/tap.js +2 -2
  170. package/dist/tap.min.js +2 -2
  171. package/dist/tap.mjs +2 -2
  172. package/dist/thunkify.es.js +2 -2
  173. package/dist/thunkify.es.min.js +2 -2
  174. package/dist/thunkify.js +2 -2
  175. package/dist/thunkify.min.js +2 -2
  176. package/dist/thunkify.mjs +2 -2
  177. package/dist/transform.es.js +2 -2
  178. package/dist/transform.es.min.js +2 -2
  179. package/dist/transform.js +2 -2
  180. package/dist/transform.min.js +2 -2
  181. package/dist/transform.mjs +2 -2
  182. package/dist/tryCatch.es.js +2 -2
  183. package/dist/tryCatch.es.min.js +2 -2
  184. package/dist/tryCatch.js +2 -2
  185. package/dist/tryCatch.min.js +2 -2
  186. package/dist/tryCatch.mjs +2 -2
  187. package/dist/x/append.es.js +2 -2
  188. package/dist/x/append.es.min.js +2 -2
  189. package/dist/x/append.js +2 -2
  190. package/dist/x/append.min.js +2 -2
  191. package/dist/x/append.mjs +2 -2
  192. package/dist/x/callProp.es.js +2 -2
  193. package/dist/x/callProp.es.min.js +2 -2
  194. package/dist/x/callProp.js +2 -2
  195. package/dist/x/callProp.min.js +2 -2
  196. package/dist/x/callProp.mjs +2 -2
  197. package/dist/x/defaultsDeep.es.js +2 -2
  198. package/dist/x/defaultsDeep.es.min.js +2 -2
  199. package/dist/x/defaultsDeep.js +2 -2
  200. package/dist/x/defaultsDeep.min.js +2 -2
  201. package/dist/x/defaultsDeep.mjs +2 -2
  202. package/dist/x/differenceWith.es.js +2 -2
  203. package/dist/x/differenceWith.es.min.js +2 -2
  204. package/dist/x/differenceWith.js +2 -2
  205. package/dist/x/differenceWith.min.js +2 -2
  206. package/dist/x/differenceWith.mjs +2 -2
  207. package/dist/x/filterOut.es.js +2 -2
  208. package/dist/x/filterOut.es.min.js +2 -2
  209. package/dist/x/filterOut.js +2 -2
  210. package/dist/x/filterOut.min.js +2 -2
  211. package/dist/x/filterOut.mjs +2 -2
  212. package/dist/x/find.es.js +2 -2
  213. package/dist/x/find.es.min.js +2 -2
  214. package/dist/x/find.js +2 -2
  215. package/dist/x/find.min.js +2 -2
  216. package/dist/x/find.mjs +2 -2
  217. package/dist/x/findIndex.es.js +2 -2
  218. package/dist/x/findIndex.es.min.js +2 -2
  219. package/dist/x/findIndex.js +2 -2
  220. package/dist/x/findIndex.min.js +2 -2
  221. package/dist/x/findIndex.mjs +2 -2
  222. package/dist/x/first.es.js +2 -2
  223. package/dist/x/first.es.min.js +2 -2
  224. package/dist/x/first.js +2 -2
  225. package/dist/x/first.min.js +2 -2
  226. package/dist/x/first.mjs +2 -2
  227. package/dist/x/flatten.es.js +2 -2
  228. package/dist/x/flatten.es.min.js +2 -2
  229. package/dist/x/flatten.js +2 -2
  230. package/dist/x/flatten.min.js +2 -2
  231. package/dist/x/flatten.mjs +2 -2
  232. package/dist/x/groupBy.es.js +2 -2
  233. package/dist/x/groupBy.es.min.js +2 -2
  234. package/dist/x/groupBy.js +2 -2
  235. package/dist/x/groupBy.min.js +2 -2
  236. package/dist/x/groupBy.mjs +2 -2
  237. package/dist/x/has.es.js +2 -2
  238. package/dist/x/has.es.min.js +2 -2
  239. package/dist/x/has.js +2 -2
  240. package/dist/x/has.min.js +2 -2
  241. package/dist/x/has.mjs +2 -2
  242. package/dist/x/identity.es.js +2 -2
  243. package/dist/x/identity.es.min.js +2 -2
  244. package/dist/x/identity.js +2 -2
  245. package/dist/x/identity.min.js +2 -2
  246. package/dist/x/identity.mjs +2 -2
  247. package/dist/x/includes.es.js +2 -2
  248. package/dist/x/includes.es.min.js +2 -2
  249. package/dist/x/includes.js +2 -2
  250. package/dist/x/includes.min.js +2 -2
  251. package/dist/x/includes.mjs +2 -2
  252. package/dist/x/isDeepEqual.es.js +2 -2
  253. package/dist/x/isDeepEqual.es.min.js +2 -2
  254. package/dist/x/isDeepEqual.js +2 -2
  255. package/dist/x/isDeepEqual.min.js +2 -2
  256. package/dist/x/isDeepEqual.mjs +2 -2
  257. package/dist/x/isEmpty.es.js +2 -2
  258. package/dist/x/isEmpty.es.min.js +2 -2
  259. package/dist/x/isEmpty.js +2 -2
  260. package/dist/x/isEmpty.min.js +2 -2
  261. package/dist/x/isEmpty.mjs +2 -2
  262. package/dist/x/isEqual.es.js +2 -2
  263. package/dist/x/isEqual.es.min.js +2 -2
  264. package/dist/x/isEqual.js +2 -2
  265. package/dist/x/isEqual.min.js +2 -2
  266. package/dist/x/isEqual.mjs +2 -2
  267. package/dist/x/isFunction.es.js +2 -2
  268. package/dist/x/isFunction.es.min.js +2 -2
  269. package/dist/x/isFunction.js +2 -2
  270. package/dist/x/isFunction.min.js +2 -2
  271. package/dist/x/isFunction.mjs +2 -2
  272. package/dist/x/isIn.es.js +2 -2
  273. package/dist/x/isIn.es.min.js +2 -2
  274. package/dist/x/isIn.js +2 -2
  275. package/dist/x/isIn.min.js +2 -2
  276. package/dist/x/isIn.mjs +2 -2
  277. package/dist/x/isObject.es.js +2 -2
  278. package/dist/x/isObject.es.min.js +2 -2
  279. package/dist/x/isObject.js +2 -2
  280. package/dist/x/isObject.min.js +2 -2
  281. package/dist/x/isObject.mjs +2 -2
  282. package/dist/x/isString.es.js +2 -2
  283. package/dist/x/isString.es.min.js +2 -2
  284. package/dist/x/isString.js +2 -2
  285. package/dist/x/isString.min.js +2 -2
  286. package/dist/x/isString.mjs +2 -2
  287. package/dist/x/keys.es.js +2 -2
  288. package/dist/x/keys.es.min.js +2 -2
  289. package/dist/x/keys.js +2 -2
  290. package/dist/x/keys.min.js +2 -2
  291. package/dist/x/keys.mjs +2 -2
  292. package/dist/x/last.es.js +2 -2
  293. package/dist/x/last.es.min.js +2 -2
  294. package/dist/x/last.js +2 -2
  295. package/dist/x/last.min.js +2 -2
  296. package/dist/x/last.mjs +2 -2
  297. package/dist/x/maxBy.es.js +6 -6
  298. package/dist/x/maxBy.es.min.js +3 -3
  299. package/dist/x/maxBy.js +6 -6
  300. package/dist/x/maxBy.min.js +3 -3
  301. package/dist/x/maxBy.mjs +6 -6
  302. package/dist/x/noop.es.js +2 -2
  303. package/dist/x/noop.es.min.js +2 -2
  304. package/dist/x/noop.js +2 -2
  305. package/dist/x/noop.min.js +2 -2
  306. package/dist/x/noop.mjs +2 -2
  307. package/dist/x/pluck.es.js +8 -8
  308. package/dist/x/pluck.es.min.js +3 -3
  309. package/dist/x/pluck.js +8 -8
  310. package/dist/x/pluck.min.js +3 -3
  311. package/dist/x/pluck.mjs +8 -8
  312. package/dist/x/prepend.es.js +2 -2
  313. package/dist/x/prepend.es.min.js +2 -2
  314. package/dist/x/prepend.js +2 -2
  315. package/dist/x/prepend.min.js +2 -2
  316. package/dist/x/prepend.mjs +2 -2
  317. package/dist/x/size.es.js +2 -2
  318. package/dist/x/size.es.min.js +2 -2
  319. package/dist/x/size.js +2 -2
  320. package/dist/x/size.min.js +2 -2
  321. package/dist/x/size.mjs +2 -2
  322. package/dist/x/trace.es.js +2 -2
  323. package/dist/x/trace.es.min.js +2 -2
  324. package/dist/x/trace.js +2 -2
  325. package/dist/x/trace.min.js +2 -2
  326. package/dist/x/trace.mjs +2 -2
  327. package/dist/x/unionWith.es.js +2 -2
  328. package/dist/x/unionWith.es.min.js +2 -2
  329. package/dist/x/unionWith.js +2 -2
  330. package/dist/x/unionWith.min.js +2 -2
  331. package/dist/x/unionWith.mjs +2 -2
  332. package/dist/x/uniq.es.js +2 -2
  333. package/dist/x/uniq.es.min.js +2 -2
  334. package/dist/x/uniq.js +2 -2
  335. package/dist/x/uniq.min.js +2 -2
  336. package/dist/x/uniq.mjs +2 -2
  337. package/dist/x/unless.es.js +2 -2
  338. package/dist/x/unless.es.min.js +2 -2
  339. package/dist/x/unless.js +2 -2
  340. package/dist/x/unless.min.js +2 -2
  341. package/dist/x/unless.mjs +2 -2
  342. package/dist/x/values.es.js +2 -2
  343. package/dist/x/values.es.min.js +2 -2
  344. package/dist/x/values.js +2 -2
  345. package/dist/x/values.min.js +2 -2
  346. package/dist/x/values.mjs +2 -2
  347. package/dist/x/when.es.js +2 -2
  348. package/dist/x/when.es.min.js +2 -2
  349. package/dist/x/when.js +2 -2
  350. package/dist/x/when.min.js +2 -2
  351. package/dist/x/when.mjs +2 -2
  352. package/eq.d.ts +51 -0
  353. package/es.d.ts +80 -0
  354. package/es.js +8 -8
  355. package/every.d.ts +52 -0
  356. package/filter.d.ts +148 -0
  357. package/flatMap.d.ts +109 -0
  358. package/forEach.d.ts +35 -0
  359. package/get.d.ts +70 -0
  360. package/get.js +4 -4
  361. package/global.d.ts +1 -0
  362. package/gt.d.ts +49 -0
  363. package/gte.d.ts +51 -0
  364. package/index.d.ts +1 -0
  365. package/index.js +8 -8
  366. package/lt.d.ts +49 -0
  367. package/lte.d.ts +49 -0
  368. package/map.d.ts +246 -0
  369. package/monad/Instance.d.ts +246 -0
  370. package/monad/Instance.js +188 -206
  371. package/not.d.ts +34 -0
  372. package/omit.d.ts +50 -0
  373. package/or.d.ts +43 -0
  374. package/package.json +41 -4
  375. package/pick.d.ts +43 -0
  376. package/pipe.d.ts +49 -0
  377. package/reduce.d.ts +166 -0
  378. package/set.d.ts +61 -0
  379. package/some.d.ts +65 -0
  380. package/switchCase.d.ts +76 -0
  381. package/tap.d.ts +53 -0
  382. package/thunkify.d.ts +21 -0
  383. package/transform.d.ts +131 -0
  384. package/tryCatch.d.ts +47 -0
  385. package/x/append.d.ts +38 -0
  386. package/x/callProp.d.ts +20 -0
  387. package/x/defaultsDeep.d.ts +42 -0
  388. package/x/differenceWith.d.ts +25 -0
  389. package/x/filterOut.d.ts +39 -0
  390. package/x/find.d.ts +34 -0
  391. package/x/findIndex.d.ts +25 -0
  392. package/x/first.d.ts +23 -0
  393. package/x/flatten.d.ts +57 -0
  394. package/x/groupBy.d.ts +50 -0
  395. package/x/has.d.ts +25 -0
  396. package/x/heapUsedInLoop.d.ts +53 -0
  397. package/x/identity.d.ts +21 -0
  398. package/x/includes.d.ts +25 -0
  399. package/x/index.d.ts +34 -0
  400. package/x/is.d.ts +2 -0
  401. package/x/isEmpty.d.ts +24 -0
  402. package/x/isEqual.d.ts +2 -0
  403. package/x/isFunction.d.ts +23 -0
  404. package/x/isIn.d.ts +61 -0
  405. package/x/isObject.d.ts +2 -0
  406. package/x/isString.benchmarks.d.ts +1 -0
  407. package/x/isString.d.ts +21 -0
  408. package/x/keys.d.ts +23 -0
  409. package/x/last.d.ts +22 -0
  410. package/x/maxBy.d.ts +41 -0
  411. package/x/noop.d.ts +21 -0
  412. package/x/pluck.d.ts +35 -0
  413. package/x/prepend.d.ts +38 -0
  414. package/x/size.d.ts +21 -0
  415. package/x/test.d.ts +1 -0
  416. package/x/timeInLoop.d.ts +21 -0
  417. package/x/trace.d.ts +30 -0
  418. package/x/tracef.d.ts +7 -0
  419. package/x/unionWith.d.ts +31 -0
  420. package/x/uniq.d.ts +24 -0
  421. package/x/unless.d.ts +28 -0
  422. package/x/values.d.ts +23 -0
  423. package/x/when.d.ts +28 -0
package/x/index.d.ts ADDED
@@ -0,0 +1,34 @@
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 ADDED
@@ -0,0 +1,2 @@
1
+ export = is;
2
+ declare function is(constructor: any): (x: any) => boolean;
package/x/isEmpty.d.ts ADDED
@@ -0,0 +1,24 @@
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 ADDED
@@ -0,0 +1,2 @@
1
+ export = isEqual;
2
+ declare function isEqual(a: any, b: any): boolean;
@@ -0,0 +1,23 @@
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 ADDED
@@ -0,0 +1,61 @@
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;
@@ -0,0 +1,2 @@
1
+ export = isObject;
2
+ import isObject = require("../_internal/isObject");
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,21 @@
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 ADDED
@@ -0,0 +1,23 @@
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 ADDED
@@ -0,0 +1,22 @@
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 item 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 ADDED
@@ -0,0 +1,41 @@
1
+ export = maxBy;
2
+ /**
3
+ * @name maxBy
4
+ *
5
+ * @synopsis
6
+ * ```coffeescript [specscript]
7
+ * maxBy(array Array, path string) -> maxItemByPath any
8
+ *
9
+ * maxBy(path string)(array Array) -> maxItemByPath any
10
+ * ```
11
+ *
12
+ * @description
13
+ * Finds the item 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 maxItem = maxBy(array, 'a')
21
+ *
22
+ * console.log(maxItem) // { a: 3 }
23
+ * ```
24
+ *
25
+ * `maxBy` composes in a pointfree 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 maxItem = pipe(numbers, [
33
+ * map(number => number ** 2),
34
+ * map(number => ({ a: { b: { c: number } } })),
35
+ * maxBy('a.b.c')
36
+ * ])
37
+ *
38
+ * console.log(maxItem) // { a: { b: { c: 9 } } }
39
+ * ```
40
+ */
41
+ declare function maxBy(...args: any[]): any;
package/x/noop.d.ts ADDED
@@ -0,0 +1,21 @@
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;
package/x/pluck.d.ts ADDED
@@ -0,0 +1,35 @@
1
+ export = pluck;
2
+ /**
3
+ * @name pluck
4
+ *
5
+ * @synopsis
6
+ * ```coffeescript [specscript]
7
+ * pluck(path string)(array Array) -> result Array
8
+ *
9
+ * pluck(array Array, path string) -> result Array
10
+ * ```
11
+ *
12
+ * @description
13
+ * Creates an array of picked properties denoted by a path from another array.
14
+ *
15
+ * `pluck` supports three types of path patterns for nested property access.
16
+ *
17
+ * * dot delimited - `'a.b.c'`
18
+ * * bracket notation - `'a[0].value'`
19
+ * * an array of keys or indices - `['a', 0, 'value']`
20
+ *
21
+ * ```javascript [playground]
22
+ * import pluck from 'https://unpkg.com/rubico/dist/x/pluck.es.js'
23
+ *
24
+ * const users = [
25
+ * { name: 'George', age: 33 },
26
+ * { name: 'Jane', age: 51 },
27
+ * { name: 'Jim', age: 22 },
28
+ * ]
29
+ *
30
+ * const usernames = pluck(users, 'name')
31
+ *
32
+ * console.log(usernames) // ['George', 'Jane', 'Jim']
33
+ * ```
34
+ */
35
+ declare function pluck(...args: any[]): any;
package/x/prepend.d.ts ADDED
@@ -0,0 +1,38 @@
1
+ export = prepend;
2
+ /**
3
+ * @name prepend
4
+ *
5
+ * @synopsis
6
+ * ```coffeescript [specscript]
7
+ * prepend(
8
+ * item string|Array,
9
+ * )(value string|Array) -> string|array
10
+ * ```
11
+ *
12
+ * @description
13
+ * Prepend a string or an array.
14
+ *
15
+ * ```javascript [playground]
16
+ * import prepend from 'https://unpkg.com/rubico/dist/x/prepend.es.js'
17
+ *
18
+ * const myArray = ['orange', 'apple']
19
+ *
20
+ * {
21
+ * const result = prepend(['ananas'])(myArray)
22
+ * console.log(result) // ['ananas', 'orange', 'apple']
23
+ * }
24
+ *
25
+ * {
26
+ * const result = prepend('ananas')(myArray)
27
+ * console.log(result) // ['ananas', 'orange', 'apple']
28
+ * }
29
+ *
30
+ * {
31
+ * const result = prepend('hello ')('world')
32
+ * console.log(result) // 'hello world'
33
+ * }
34
+ * ```
35
+ *
36
+ * @since 1.7.3
37
+ */
38
+ declare function prepend(item: any): (value: any) => string | any[];
package/x/size.d.ts ADDED
@@ -0,0 +1,21 @@
1
+ export = size;
2
+ /**
3
+ * @name size
4
+ *
5
+ * @synopsis
6
+ * ```coffeescript [specscript]
7
+ * size(value any) -> number
8
+ * ```
9
+ *
10
+ * @description
11
+ * Get the count of items in a value.
12
+ *
13
+ * ```javascript [playground]
14
+ * import size from 'https://unpkg.com/rubico/dist/x/size.es.js'
15
+ *
16
+ * console.log(size([1, 2, 3])) // 3
17
+ * console.log(size('hey')) // 3
18
+ * console.log(size(new Set([1, 2, 3]))) // 3
19
+ * ```
20
+ */
21
+ declare function size(value: any): any;
package/x/test.d.ts ADDED
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,21 @@
1
+ export = timeInLoop;
2
+ /**
3
+ * @name timeInLoop
4
+ *
5
+ * @synopsis
6
+ * timeInLoop(desc string, loopCount number, fn function) -> undefined
7
+ *
8
+ * @description
9
+ * Logs the amount of time required for a function to run a certain number of times
10
+ *
11
+ * ```coffeescript [specscript]
12
+ * timeInLoop('hello', 1e6, () => 'hello') // hello: 1e+6: 3.474ms
13
+ * ```
14
+ *
15
+ * Reference: https://gist.github.com/funfunction/91b5876a5f562e1e352aed0fcabc3858
16
+ */
17
+ declare const timeInLoop: (description: any, loopCount: any, fn: any, options?: {}) => {
18
+ description: any;
19
+ loopCount: any;
20
+ duration: number;
21
+ };
package/x/trace.d.ts ADDED
@@ -0,0 +1,30 @@
1
+ export = trace;
2
+ /**
3
+ * @name trace
4
+ *
5
+ * @synopsis
6
+ * ```coffeescript [specscript]
7
+ * var args ...any,
8
+ * resolved any,
9
+ * resolver ...args=>resolved
10
+ *
11
+ * trace(...args) -> args[0]
12
+ *
13
+ * trace(resolver)(...args) -> resolved
14
+ * ```
15
+ *
16
+ * @description
17
+ * Log a value out to the console, returning the value. If the value is a function, treat it as a resolver.
18
+ *
19
+ * ```javascript [playground]
20
+ * import trace from 'https://unpkg.com/rubico/dist/x/trace.es.js'
21
+ *
22
+ * pipe([
23
+ * trace,
24
+ * trace(value => value.toUpperCase()),
25
+ * ])('hey') // hey
26
+ * // HEY
27
+ * console.log('check your console')
28
+ * ```
29
+ */
30
+ declare function trace(...args: any[]): any;
package/x/tracef.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ export = tracef;
2
+ /**
3
+ * @name tracef
4
+ *
5
+ * @DEPRECATED
6
+ */
7
+ declare function tracef(f: any): any;
@@ -0,0 +1,31 @@
1
+ export = unionWith;
2
+ /**
3
+ * @name unionWith
4
+ *
5
+ * @synopsis
6
+ * ```coffeescript [specscript]
7
+ * var T any,
8
+ * arrayOfArrays Array<Array<T>>,
9
+ * comparator (T, T)=>Promise|boolean
10
+ *
11
+ * unionWith(comparator)(arrayOfArrays) -> Array<T>
12
+ * ```
13
+ *
14
+ * @description
15
+ * Create an array of unique values from an array of arrays with uniqueness determined by a comparator. The comparator is a function that returns a boolean value, `true` if two given values are distinct.
16
+ *
17
+ * ```javascript [playground]
18
+ * import isDeepEqual from 'https://unpkg.com/rubico/dist/x/isDeepEqual.es.js'
19
+ * import unionWith from 'https://unpkg.com/rubico/dist/x/unionWith.es.js'
20
+ *
21
+ * console.log(
22
+ * unionWith(isDeepEqual)([
23
+ * [{ a: 1 }, { b: 2 }, { a: 1 }],
24
+ * [{ b: 2 }, { b: 2 }, { b: 2 }],
25
+ * ]),
26
+ * ) // [{ a: 1 }, { b: 2 }]
27
+ * ```
28
+ *
29
+ * @TODO setUnionWith
30
+ */
31
+ declare function unionWith(comparator: any): (value: any) => any;
package/x/uniq.d.ts ADDED
@@ -0,0 +1,24 @@
1
+ export = uniq;
2
+ /**
3
+ * @name uniq
4
+ *
5
+ * @synopsis
6
+ * ```coffeescript [specscript]
7
+ * var T any,
8
+ * array Array<T>
9
+ *
10
+ * uniq(array) -> Array
11
+ * ```
12
+ *
13
+ * @description
14
+ * Get an array of unique values from an array.
15
+ *
16
+ * ```javascript [playground]
17
+ * import uniq from 'https://unpkg.com/rubico/dist/x/uniq.es.js'
18
+ *
19
+ * console.log(
20
+ * uniq([1, 2, 2, 3]),
21
+ * ) // [1, 2, 3]
22
+ * ```
23
+ */
24
+ declare function uniq(arr: any): any[];
package/x/unless.d.ts ADDED
@@ -0,0 +1,28 @@
1
+ export = unless;
2
+ /**
3
+ * @name unless
4
+ *
5
+ * @synopsis
6
+ * ```coffeescript [specscript]
7
+ * unless(
8
+ * predicate any=>Promise|boolean,
9
+ * func function,
10
+ * )(value any) -> Promise|any
11
+ * ```
12
+ *
13
+ * @description
14
+ * Execute a function and return the result unless a condition is true, otherwise return the original value.
15
+ *
16
+ * ```javascript [playground]
17
+ * import unless from 'https://unpkg.com/rubico/dist/x/unless.es.js'
18
+ *
19
+ * const isEven = num => num % 2 === 0
20
+ * const doubleIfOdd = unless(isEven, num => num * 2)
21
+ *
22
+ * console.log(doubleIfOdd(100)) // 100
23
+ * console.log(doubleIfOdd(101)) // 202
24
+ * ```
25
+ *
26
+ * @since 1.7.3
27
+ */
28
+ declare function unless(predicate: any, func: any): (value: any) => any;
package/x/values.d.ts ADDED
@@ -0,0 +1,23 @@
1
+ export = values;
2
+ /**
3
+ * @name values
4
+ *
5
+ * @synopsis
6
+ * ```coffeescript [specscript]
7
+ * values<T>(
8
+ * object String<T>|Array<T>|Set<T>|Map<any=>T>|Object<T>,
9
+ * ) -> Array<T>
10
+ * ```
11
+ *
12
+ * @description
13
+ * Get an array of values from an instance.
14
+ *
15
+ * ```javascript [playground]
16
+ * import values from 'https://unpkg.com/rubico/dist/x/values.es.js'
17
+ *
18
+ * console.log(values({ a: 1, b: 2, c: 3 })) // [1, 2, 3]
19
+ * console.log(values('abc')) // ['a', 'b', 'c']
20
+ * console.log(values(new Map([[1, 'hello'], [2, 'world']]))) // ['hello', 'world']
21
+ * ```
22
+ */
23
+ declare function values(object: any): any;
package/x/when.d.ts ADDED
@@ -0,0 +1,28 @@
1
+ export = when;
2
+ /**
3
+ * @name when
4
+ *
5
+ * @synopsis
6
+ * ```coffeescript [specscript]
7
+ * when(
8
+ * predicate any=>Promise|boolean,
9
+ * func function,
10
+ * )(value any) -> Promise|any
11
+ * ```
12
+ *
13
+ * @description
14
+ * Execute a function and return the result when a condition is true, otherwise return the original value.
15
+ *
16
+ * ```javascript [playground]
17
+ * import when from 'https://unpkg.com/rubico/dist/x/when.es.js'
18
+ *
19
+ * const isEven = num => num % 2 === 0
20
+ * const doubleIfEven = when(isEven, num => num * 2)
21
+ *
22
+ * console.log(doubleIfEven(100)) // 200
23
+ * console.log(doubleIfEven(101)) // 101
24
+ * ```
25
+ *
26
+ * @since 1.7.1
27
+ */
28
+ declare function when(predicate: any, func: any): (value: any) => any;