zhiaiwan-utils 1.0.3

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 (761) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +92 -0
  3. package/dist/cjs/_internal/MapCache.js +29 -0
  4. package/dist/cjs/_internal/assignSources.js +24 -0
  5. package/dist/cjs/_internal/assignValue.js +20 -0
  6. package/dist/cjs/_internal/baseClone.js +190 -0
  7. package/dist/cjs/_internal/baseCollectionKeys.js +59 -0
  8. package/dist/cjs/_internal/baseDefaultsDeep.js +59 -0
  9. package/dist/cjs/_internal/baseDifference.js +25 -0
  10. package/dist/cjs/_internal/baseExtremum.js +34 -0
  11. package/dist/cjs/_internal/baseExtremumBy.js +63 -0
  12. package/dist/cjs/_internal/baseFilter.js +61 -0
  13. package/dist/cjs/_internal/baseFind.js +153 -0
  14. package/dist/cjs/_internal/baseFlatten.js +32 -0
  15. package/dist/cjs/_internal/baseForEach.js +92 -0
  16. package/dist/cjs/_internal/baseForOwn.js +33 -0
  17. package/dist/cjs/_internal/baseIsEqual.js +161 -0
  18. package/dist/cjs/_internal/baseIsMatch.js +80 -0
  19. package/dist/cjs/_internal/baseIteratee.js +46 -0
  20. package/dist/cjs/_internal/baseKeysIn.js +44 -0
  21. package/dist/cjs/_internal/baseMap.js +49 -0
  22. package/dist/cjs/_internal/baseMerge.js +139 -0
  23. package/dist/cjs/_internal/basePad.js +40 -0
  24. package/dist/cjs/_internal/basePath.js +85 -0
  25. package/dist/cjs/_internal/baseRange.js +18 -0
  26. package/dist/cjs/_internal/baseReduce.js +77 -0
  27. package/dist/cjs/_internal/baseSum.js +27 -0
  28. package/dist/cjs/_internal/baseTreeTraverse.js +225 -0
  29. package/dist/cjs/_internal/baseTrim.js +32 -0
  30. package/dist/cjs/_internal/baseUnset.js +49 -0
  31. package/dist/cjs/_internal/baseUpdate.js +65 -0
  32. package/dist/cjs/_internal/coerceToString.js +21 -0
  33. package/dist/cjs/_internal/colorMath.js +66 -0
  34. package/dist/cjs/_internal/compareValues.js +49 -0
  35. package/dist/cjs/_internal/composePartials.js +39 -0
  36. package/dist/cjs/_internal/createCompounder.js +24 -0
  37. package/dist/cjs/_internal/deburr.js +74 -0
  38. package/dist/cjs/_internal/flattenPaths.js +21 -0
  39. package/dist/cjs/_internal/htmlEscape.js +36 -0
  40. package/dist/cjs/_internal/identity.js +11 -0
  41. package/dist/cjs/_internal/index.js +21 -0
  42. package/dist/cjs/_internal/isArguments.js +31 -0
  43. package/dist/cjs/_internal/isArrayLike.js +15 -0
  44. package/dist/cjs/_internal/isArrayLikeObject.js +15 -0
  45. package/dist/cjs/_internal/isEmptyValue.js +11 -0
  46. package/dist/cjs/_internal/isFlattenable.js +15 -0
  47. package/dist/cjs/_internal/isIndex.js +23 -0
  48. package/dist/cjs/_internal/isLength.js +15 -0
  49. package/dist/cjs/_internal/isPlainObject.js +17 -0
  50. package/dist/cjs/_internal/mergeInto.js +33 -0
  51. package/dist/cjs/_internal/repeatString.js +15 -0
  52. package/dist/cjs/_internal/toInteger.js +24 -0
  53. package/dist/cjs/_internal/toLength.js +17 -0
  54. package/dist/cjs/_internal/toPath.js +29 -0
  55. package/dist/cjs/_internal/upperFirst.js +14 -0
  56. package/dist/cjs/_internal/validateFieldRule.js +138 -0
  57. package/dist/cjs/_internal/words.js +13 -0
  58. package/dist/cjs/array/chunk.js +37 -0
  59. package/dist/cjs/array/compact.js +34 -0
  60. package/dist/cjs/array/concat.js +37 -0
  61. package/dist/cjs/array/difference.js +44 -0
  62. package/dist/cjs/array/differenceBy.js +55 -0
  63. package/dist/cjs/array/drop.js +31 -0
  64. package/dist/cjs/array/each.js +23 -0
  65. package/dist/cjs/array/every.js +69 -0
  66. package/dist/cjs/array/filter.js +26 -0
  67. package/dist/cjs/array/find.js +29 -0
  68. package/dist/cjs/array/findIndex.js +24 -0
  69. package/dist/cjs/array/findLast.js +24 -0
  70. package/dist/cjs/array/findLastIndex.js +24 -0
  71. package/dist/cjs/array/flatten.js +27 -0
  72. package/dist/cjs/array/flattenDeep.js +28 -0
  73. package/dist/cjs/array/forEach.js +32 -0
  74. package/dist/cjs/array/forEachRight.js +29 -0
  75. package/dist/cjs/array/groupBy.js +67 -0
  76. package/dist/cjs/array/head.js +21 -0
  77. package/dist/cjs/array/includes.js +60 -0
  78. package/dist/cjs/array/index.js +92 -0
  79. package/dist/cjs/array/intersection.js +51 -0
  80. package/dist/cjs/array/keyBy.js +79 -0
  81. package/dist/cjs/array/last.js +23 -0
  82. package/dist/cjs/array/map.js +26 -0
  83. package/dist/cjs/array/max.js +25 -0
  84. package/dist/cjs/array/maxBy.js +27 -0
  85. package/dist/cjs/array/mean.js +27 -0
  86. package/dist/cjs/array/meanBy.js +30 -0
  87. package/dist/cjs/array/min.js +25 -0
  88. package/dist/cjs/array/minBy.js +27 -0
  89. package/dist/cjs/array/orderBy.js +95 -0
  90. package/dist/cjs/array/partition.js +68 -0
  91. package/dist/cjs/array/reduce.js +30 -0
  92. package/dist/cjs/array/reduceRight.js +30 -0
  93. package/dist/cjs/array/some.js +66 -0
  94. package/dist/cjs/array/sortBy.js +27 -0
  95. package/dist/cjs/array/sum.js +25 -0
  96. package/dist/cjs/array/sumBy.js +31 -0
  97. package/dist/cjs/array/take.js +31 -0
  98. package/dist/cjs/array/union.js +35 -0
  99. package/dist/cjs/array/uniq.js +33 -0
  100. package/dist/cjs/array/uniqBy.js +41 -0
  101. package/dist/cjs/array/without.js +30 -0
  102. package/dist/cjs/color/getCssVariable.js +31 -0
  103. package/dist/cjs/color/getThemePalette.js +56 -0
  104. package/dist/cjs/color/hexToRgb.js +26 -0
  105. package/dist/cjs/color/index.js +16 -0
  106. package/dist/cjs/color/rgbStringToHex.js +42 -0
  107. package/dist/cjs/color/rgbToHex.js +24 -0
  108. package/dist/cjs/convert/index.js +32 -0
  109. package/dist/cjs/convert/toArray.js +56 -0
  110. package/dist/cjs/convert/toFinite.js +34 -0
  111. package/dist/cjs/convert/toInteger.js +33 -0
  112. package/dist/cjs/convert/toLength.js +30 -0
  113. package/dist/cjs/convert/toLower.js +25 -0
  114. package/dist/cjs/convert/toNumber.js +55 -0
  115. package/dist/cjs/convert/toPairs.js +24 -0
  116. package/dist/cjs/convert/toPairsIn.js +32 -0
  117. package/dist/cjs/convert/toPath.js +23 -0
  118. package/dist/cjs/convert/toPlainObject.js +39 -0
  119. package/dist/cjs/convert/toSafeInteger.js +34 -0
  120. package/dist/cjs/convert/toString.js +34 -0
  121. package/dist/cjs/convert/toUpper.js +25 -0
  122. package/dist/cjs/function/after.js +32 -0
  123. package/dist/cjs/function/before.js +32 -0
  124. package/dist/cjs/function/curry.js +57 -0
  125. package/dist/cjs/function/debounce.js +107 -0
  126. package/dist/cjs/function/flow.js +51 -0
  127. package/dist/cjs/function/flowRight.js +46 -0
  128. package/dist/cjs/function/index.js +30 -0
  129. package/dist/cjs/function/memoize.js +26 -0
  130. package/dist/cjs/function/once.js +31 -0
  131. package/dist/cjs/function/partial.js +35 -0
  132. package/dist/cjs/function/partialRight.js +33 -0
  133. package/dist/cjs/function/throttle.js +20 -0
  134. package/dist/cjs/index.js +28 -0
  135. package/dist/cjs/object/assign.js +24 -0
  136. package/dist/cjs/object/clone.js +29 -0
  137. package/dist/cjs/object/cloneDeep.js +30 -0
  138. package/dist/cjs/object/cloneDeepWith.js +30 -0
  139. package/dist/cjs/object/cloneWith.js +30 -0
  140. package/dist/cjs/object/defaults.js +23 -0
  141. package/dist/cjs/object/defaultsDeep.js +44 -0
  142. package/dist/cjs/object/findKey.js +26 -0
  143. package/dist/cjs/object/findLastKey.js +26 -0
  144. package/dist/cjs/object/forIn.js +29 -0
  145. package/dist/cjs/object/forOwn.js +29 -0
  146. package/dist/cjs/object/fromPairs.js +28 -0
  147. package/dist/cjs/object/get.js +37 -0
  148. package/dist/cjs/object/has.js +39 -0
  149. package/dist/cjs/object/index.js +64 -0
  150. package/dist/cjs/object/invert.js +34 -0
  151. package/dist/cjs/object/keys.js +25 -0
  152. package/dist/cjs/object/mapKeys.js +37 -0
  153. package/dist/cjs/object/mapValues.js +37 -0
  154. package/dist/cjs/object/merge.js +29 -0
  155. package/dist/cjs/object/mergeWith.js +41 -0
  156. package/dist/cjs/object/omit.js +36 -0
  157. package/dist/cjs/object/omitBy.js +38 -0
  158. package/dist/cjs/object/pick.js +37 -0
  159. package/dist/cjs/object/pickBy.js +38 -0
  160. package/dist/cjs/object/set.js +67 -0
  161. package/dist/cjs/object/unset.js +28 -0
  162. package/dist/cjs/object/update.js +31 -0
  163. package/dist/cjs/object/updateWith.js +33 -0
  164. package/dist/cjs/object/values.js +25 -0
  165. package/dist/cjs/string/camelCase.js +37 -0
  166. package/dist/cjs/string/capitalize.js +25 -0
  167. package/dist/cjs/string/endsWith.js +36 -0
  168. package/dist/cjs/string/escape.js +26 -0
  169. package/dist/cjs/string/index.js +40 -0
  170. package/dist/cjs/string/kebabCase.js +27 -0
  171. package/dist/cjs/string/lowerCase.js +24 -0
  172. package/dist/cjs/string/pad.js +31 -0
  173. package/dist/cjs/string/padEnd.js +31 -0
  174. package/dist/cjs/string/padStart.js +31 -0
  175. package/dist/cjs/string/repeat.js +30 -0
  176. package/dist/cjs/string/snakeCase.js +27 -0
  177. package/dist/cjs/string/startsWith.js +34 -0
  178. package/dist/cjs/string/trim.js +30 -0
  179. package/dist/cjs/string/trimEnd.js +30 -0
  180. package/dist/cjs/string/trimStart.js +30 -0
  181. package/dist/cjs/string/unescape.js +26 -0
  182. package/dist/cjs/string/upperFirst.js +25 -0
  183. package/dist/cjs/tree/filterTreeNodes.js +51 -0
  184. package/dist/cjs/tree/findTreeNode.js +45 -0
  185. package/dist/cjs/tree/forEachTree.js +33 -0
  186. package/dist/cjs/tree/getParentNodes.js +49 -0
  187. package/dist/cjs/tree/getTreeDepth.js +38 -0
  188. package/dist/cjs/tree/index.js +30 -0
  189. package/dist/cjs/tree/mapTree.js +98 -0
  190. package/dist/cjs/tree/pruneTree.js +126 -0
  191. package/dist/cjs/tree/toFlatList.js +57 -0
  192. package/dist/cjs/tree/toTree.js +71 -0
  193. package/dist/cjs/tree/traverseTree.js +29 -0
  194. package/dist/cjs/tree/traverseTreeBfs.js +29 -0
  195. package/dist/cjs/util/clamp.js +56 -0
  196. package/dist/cjs/util/constant.js +21 -0
  197. package/dist/cjs/util/defaultTo.js +28 -0
  198. package/dist/cjs/util/defer.js +25 -0
  199. package/dist/cjs/util/delay.js +25 -0
  200. package/dist/cjs/util/identity.js +22 -0
  201. package/dist/cjs/util/inRange.js +41 -0
  202. package/dist/cjs/util/index.js +48 -0
  203. package/dist/cjs/util/iteratee.js +30 -0
  204. package/dist/cjs/util/matches.js +27 -0
  205. package/dist/cjs/util/matchesProperty.js +37 -0
  206. package/dist/cjs/util/negate.js +25 -0
  207. package/dist/cjs/util/noop.js +20 -0
  208. package/dist/cjs/util/now.js +20 -0
  209. package/dist/cjs/util/property.js +33 -0
  210. package/dist/cjs/util/random.js +71 -0
  211. package/dist/cjs/util/range.js +46 -0
  212. package/dist/cjs/util/size.js +47 -0
  213. package/dist/cjs/util/sleep.js +22 -0
  214. package/dist/cjs/util/times.js +41 -0
  215. package/dist/cjs/util/uniqueId.js +26 -0
  216. package/dist/cjs/util/validateFields.js +106 -0
  217. package/dist/cjs/verify/index.js +78 -0
  218. package/dist/cjs/verify/isArguments.js +25 -0
  219. package/dist/cjs/verify/isArray.js +21 -0
  220. package/dist/cjs/verify/isArrayBuffer.js +21 -0
  221. package/dist/cjs/verify/isArrayLike.js +31 -0
  222. package/dist/cjs/verify/isBoolean.js +21 -0
  223. package/dist/cjs/verify/isBuffer.js +23 -0
  224. package/dist/cjs/verify/isDate.js +21 -0
  225. package/dist/cjs/verify/isElement.js +26 -0
  226. package/dist/cjs/verify/isEmpty.js +44 -0
  227. package/dist/cjs/verify/isEqual.js +30 -0
  228. package/dist/cjs/verify/isEqualWith.js +31 -0
  229. package/dist/cjs/verify/isError.js +23 -0
  230. package/dist/cjs/verify/isFinite.js +28 -0
  231. package/dist/cjs/verify/isFunction.js +22 -0
  232. package/dist/cjs/verify/isInteger.js +22 -0
  233. package/dist/cjs/verify/isLength.js +26 -0
  234. package/dist/cjs/verify/isMap.js +21 -0
  235. package/dist/cjs/verify/isMatch.js +30 -0
  236. package/dist/cjs/verify/isMatchWith.js +31 -0
  237. package/dist/cjs/verify/isNaN.js +28 -0
  238. package/dist/cjs/verify/isNative.js +25 -0
  239. package/dist/cjs/verify/isNil.js +27 -0
  240. package/dist/cjs/verify/isNull.js +21 -0
  241. package/dist/cjs/verify/isNumber.js +24 -0
  242. package/dist/cjs/verify/isObject.js +26 -0
  243. package/dist/cjs/verify/isObjectLike.js +30 -0
  244. package/dist/cjs/verify/isPlainObject.js +25 -0
  245. package/dist/cjs/verify/isRegExp.js +21 -0
  246. package/dist/cjs/verify/isSafeInteger.js +30 -0
  247. package/dist/cjs/verify/isSet.js +21 -0
  248. package/dist/cjs/verify/isString.js +21 -0
  249. package/dist/cjs/verify/isSymbol.js +21 -0
  250. package/dist/cjs/verify/isTypedArray.js +38 -0
  251. package/dist/cjs/verify/isUndefined.js +21 -0
  252. package/dist/cjs/verify/isWeakMap.js +21 -0
  253. package/dist/cjs/verify/isWeakSet.js +21 -0
  254. package/dist/cjs/version.js +17 -0
  255. package/dist/esm/_internal/MapCache.js +26 -0
  256. package/dist/esm/_internal/assignSources.js +21 -0
  257. package/dist/esm/_internal/assignValue.js +17 -0
  258. package/dist/esm/_internal/baseClone.js +187 -0
  259. package/dist/esm/_internal/baseCollectionKeys.js +52 -0
  260. package/dist/esm/_internal/baseDefaultsDeep.js +53 -0
  261. package/dist/esm/_internal/baseDifference.js +22 -0
  262. package/dist/esm/_internal/baseExtremum.js +28 -0
  263. package/dist/esm/_internal/baseExtremumBy.js +57 -0
  264. package/dist/esm/_internal/baseFilter.js +55 -0
  265. package/dist/esm/_internal/baseFind.js +145 -0
  266. package/dist/esm/_internal/baseFlatten.js +26 -0
  267. package/dist/esm/_internal/baseForEach.js +86 -0
  268. package/dist/esm/_internal/baseForOwn.js +26 -0
  269. package/dist/esm/_internal/baseIsEqual.js +158 -0
  270. package/dist/esm/_internal/baseIsMatch.js +74 -0
  271. package/dist/esm/_internal/baseIteratee.js +40 -0
  272. package/dist/esm/_internal/baseKeysIn.js +38 -0
  273. package/dist/esm/_internal/baseMap.js +43 -0
  274. package/dist/esm/_internal/baseMerge.js +132 -0
  275. package/dist/esm/_internal/basePad.js +34 -0
  276. package/dist/esm/_internal/basePath.js +77 -0
  277. package/dist/esm/_internal/baseRange.js +15 -0
  278. package/dist/esm/_internal/baseReduce.js +71 -0
  279. package/dist/esm/_internal/baseSum.js +21 -0
  280. package/dist/esm/_internal/baseTreeTraverse.js +219 -0
  281. package/dist/esm/_internal/baseTrim.js +29 -0
  282. package/dist/esm/_internal/baseUnset.js +43 -0
  283. package/dist/esm/_internal/baseUpdate.js +59 -0
  284. package/dist/esm/_internal/coerceToString.js +18 -0
  285. package/dist/esm/_internal/colorMath.js +56 -0
  286. package/dist/esm/_internal/compareValues.js +45 -0
  287. package/dist/esm/_internal/composePartials.js +35 -0
  288. package/dist/esm/_internal/createCompounder.js +18 -0
  289. package/dist/esm/_internal/deburr.js +71 -0
  290. package/dist/esm/_internal/flattenPaths.js +18 -0
  291. package/dist/esm/_internal/htmlEscape.js +32 -0
  292. package/dist/esm/_internal/identity.js +8 -0
  293. package/dist/esm/_internal/index.js +8 -0
  294. package/dist/esm/_internal/isArguments.js +28 -0
  295. package/dist/esm/_internal/isArrayLike.js +9 -0
  296. package/dist/esm/_internal/isArrayLikeObject.js +9 -0
  297. package/dist/esm/_internal/isEmptyValue.js +8 -0
  298. package/dist/esm/_internal/isFlattenable.js +9 -0
  299. package/dist/esm/_internal/isIndex.js +20 -0
  300. package/dist/esm/_internal/isLength.js +12 -0
  301. package/dist/esm/_internal/isPlainObject.js +14 -0
  302. package/dist/esm/_internal/mergeInto.js +27 -0
  303. package/dist/esm/_internal/repeatString.js +12 -0
  304. package/dist/esm/_internal/toInteger.js +21 -0
  305. package/dist/esm/_internal/toLength.js +11 -0
  306. package/dist/esm/_internal/toPath.js +26 -0
  307. package/dist/esm/_internal/upperFirst.js +11 -0
  308. package/dist/esm/_internal/validateFieldRule.js +132 -0
  309. package/dist/esm/_internal/words.js +10 -0
  310. package/dist/esm/array/chunk.js +31 -0
  311. package/dist/esm/array/compact.js +31 -0
  312. package/dist/esm/array/concat.js +34 -0
  313. package/dist/esm/array/difference.js +38 -0
  314. package/dist/esm/array/differenceBy.js +49 -0
  315. package/dist/esm/array/drop.js +25 -0
  316. package/dist/esm/array/each.js +18 -0
  317. package/dist/esm/array/every.js +63 -0
  318. package/dist/esm/array/filter.js +20 -0
  319. package/dist/esm/array/find.js +26 -0
  320. package/dist/esm/array/findIndex.js +21 -0
  321. package/dist/esm/array/findLast.js +21 -0
  322. package/dist/esm/array/findLastIndex.js +21 -0
  323. package/dist/esm/array/flatten.js +21 -0
  324. package/dist/esm/array/flattenDeep.js +22 -0
  325. package/dist/esm/array/forEach.js +26 -0
  326. package/dist/esm/array/forEachRight.js +23 -0
  327. package/dist/esm/array/groupBy.js +61 -0
  328. package/dist/esm/array/head.js +18 -0
  329. package/dist/esm/array/includes.js +54 -0
  330. package/dist/esm/array/index.js +43 -0
  331. package/dist/esm/array/intersection.js +48 -0
  332. package/dist/esm/array/keyBy.js +73 -0
  333. package/dist/esm/array/last.js +20 -0
  334. package/dist/esm/array/map.js +20 -0
  335. package/dist/esm/array/max.js +19 -0
  336. package/dist/esm/array/maxBy.js +21 -0
  337. package/dist/esm/array/mean.js +21 -0
  338. package/dist/esm/array/meanBy.js +24 -0
  339. package/dist/esm/array/min.js +19 -0
  340. package/dist/esm/array/minBy.js +21 -0
  341. package/dist/esm/array/orderBy.js +89 -0
  342. package/dist/esm/array/partition.js +62 -0
  343. package/dist/esm/array/reduce.js +24 -0
  344. package/dist/esm/array/reduceRight.js +24 -0
  345. package/dist/esm/array/some.js +60 -0
  346. package/dist/esm/array/sortBy.js +21 -0
  347. package/dist/esm/array/sum.js +19 -0
  348. package/dist/esm/array/sumBy.js +25 -0
  349. package/dist/esm/array/take.js +25 -0
  350. package/dist/esm/array/union.js +32 -0
  351. package/dist/esm/array/uniq.js +30 -0
  352. package/dist/esm/array/uniqBy.js +35 -0
  353. package/dist/esm/array/without.js +24 -0
  354. package/dist/esm/color/getCssVariable.js +28 -0
  355. package/dist/esm/color/getThemePalette.js +53 -0
  356. package/dist/esm/color/hexToRgb.js +23 -0
  357. package/dist/esm/color/index.js +5 -0
  358. package/dist/esm/color/rgbStringToHex.js +36 -0
  359. package/dist/esm/color/rgbToHex.js +21 -0
  360. package/dist/esm/convert/index.js +13 -0
  361. package/dist/esm/convert/toArray.js +50 -0
  362. package/dist/esm/convert/toFinite.js +28 -0
  363. package/dist/esm/convert/toInteger.js +27 -0
  364. package/dist/esm/convert/toLength.js +24 -0
  365. package/dist/esm/convert/toLower.js +19 -0
  366. package/dist/esm/convert/toNumber.js +52 -0
  367. package/dist/esm/convert/toPairs.js +21 -0
  368. package/dist/esm/convert/toPairsIn.js +29 -0
  369. package/dist/esm/convert/toPath.js +16 -0
  370. package/dist/esm/convert/toPlainObject.js +36 -0
  371. package/dist/esm/convert/toSafeInteger.js +28 -0
  372. package/dist/esm/convert/toString.js +31 -0
  373. package/dist/esm/convert/toUpper.js +19 -0
  374. package/dist/esm/function/after.js +29 -0
  375. package/dist/esm/function/before.js +29 -0
  376. package/dist/esm/function/curry.js +53 -0
  377. package/dist/esm/function/debounce.js +104 -0
  378. package/dist/esm/function/flow.js +49 -0
  379. package/dist/esm/function/flowRight.js +43 -0
  380. package/dist/esm/function/index.js +11 -0
  381. package/dist/esm/function/memoize.js +20 -0
  382. package/dist/esm/function/once.js +28 -0
  383. package/dist/esm/function/partial.js +31 -0
  384. package/dist/esm/function/partialRight.js +30 -0
  385. package/dist/esm/function/throttle.js +14 -0
  386. package/dist/esm/index.js +10 -0
  387. package/dist/esm/object/assign.js +21 -0
  388. package/dist/esm/object/clone.js +23 -0
  389. package/dist/esm/object/cloneDeep.js +24 -0
  390. package/dist/esm/object/cloneDeepWith.js +24 -0
  391. package/dist/esm/object/cloneWith.js +24 -0
  392. package/dist/esm/object/defaults.js +20 -0
  393. package/dist/esm/object/defaultsDeep.js +38 -0
  394. package/dist/esm/object/findKey.js +23 -0
  395. package/dist/esm/object/findLastKey.js +23 -0
  396. package/dist/esm/object/forIn.js +23 -0
  397. package/dist/esm/object/forOwn.js +23 -0
  398. package/dist/esm/object/fromPairs.js +25 -0
  399. package/dist/esm/object/get.js +31 -0
  400. package/dist/esm/object/has.js +33 -0
  401. package/dist/esm/object/index.js +29 -0
  402. package/dist/esm/object/invert.js +31 -0
  403. package/dist/esm/object/keys.js +22 -0
  404. package/dist/esm/object/mapKeys.js +31 -0
  405. package/dist/esm/object/mapValues.js +31 -0
  406. package/dist/esm/object/merge.js +23 -0
  407. package/dist/esm/object/mergeWith.js +35 -0
  408. package/dist/esm/object/omit.js +30 -0
  409. package/dist/esm/object/omitBy.js +32 -0
  410. package/dist/esm/object/pick.js +31 -0
  411. package/dist/esm/object/pickBy.js +32 -0
  412. package/dist/esm/object/set.js +61 -0
  413. package/dist/esm/object/unset.js +22 -0
  414. package/dist/esm/object/update.js +25 -0
  415. package/dist/esm/object/updateWith.js +27 -0
  416. package/dist/esm/object/values.js +22 -0
  417. package/dist/esm/string/camelCase.js +31 -0
  418. package/dist/esm/string/capitalize.js +19 -0
  419. package/dist/esm/string/endsWith.js +30 -0
  420. package/dist/esm/string/escape.js +20 -0
  421. package/dist/esm/string/index.js +17 -0
  422. package/dist/esm/string/kebabCase.js +22 -0
  423. package/dist/esm/string/lowerCase.js +19 -0
  424. package/dist/esm/string/pad.js +25 -0
  425. package/dist/esm/string/padEnd.js +25 -0
  426. package/dist/esm/string/padStart.js +25 -0
  427. package/dist/esm/string/repeat.js +24 -0
  428. package/dist/esm/string/snakeCase.js +22 -0
  429. package/dist/esm/string/startsWith.js +28 -0
  430. package/dist/esm/string/trim.js +24 -0
  431. package/dist/esm/string/trimEnd.js +24 -0
  432. package/dist/esm/string/trimStart.js +24 -0
  433. package/dist/esm/string/unescape.js +20 -0
  434. package/dist/esm/string/upperFirst.js +19 -0
  435. package/dist/esm/tree/filterTreeNodes.js +45 -0
  436. package/dist/esm/tree/findTreeNode.js +39 -0
  437. package/dist/esm/tree/forEachTree.js +27 -0
  438. package/dist/esm/tree/getParentNodes.js +43 -0
  439. package/dist/esm/tree/getTreeDepth.js +32 -0
  440. package/dist/esm/tree/index.js +12 -0
  441. package/dist/esm/tree/mapTree.js +95 -0
  442. package/dist/esm/tree/pruneTree.js +123 -0
  443. package/dist/esm/tree/toFlatList.js +51 -0
  444. package/dist/esm/tree/toTree.js +68 -0
  445. package/dist/esm/tree/traverseTree.js +23 -0
  446. package/dist/esm/tree/traverseTreeBfs.js +23 -0
  447. package/dist/esm/util/clamp.js +53 -0
  448. package/dist/esm/util/constant.js +18 -0
  449. package/dist/esm/util/defaultTo.js +25 -0
  450. package/dist/esm/util/defer.js +19 -0
  451. package/dist/esm/util/delay.js +22 -0
  452. package/dist/esm/util/identity.js +17 -0
  453. package/dist/esm/util/inRange.js +38 -0
  454. package/dist/esm/util/index.js +21 -0
  455. package/dist/esm/util/iteratee.js +24 -0
  456. package/dist/esm/util/matches.js +21 -0
  457. package/dist/esm/util/matchesProperty.js +31 -0
  458. package/dist/esm/util/negate.js +22 -0
  459. package/dist/esm/util/noop.js +17 -0
  460. package/dist/esm/util/now.js +17 -0
  461. package/dist/esm/util/property.js +27 -0
  462. package/dist/esm/util/random.js +68 -0
  463. package/dist/esm/util/range.js +40 -0
  464. package/dist/esm/util/size.js +41 -0
  465. package/dist/esm/util/sleep.js +19 -0
  466. package/dist/esm/util/times.js +35 -0
  467. package/dist/esm/util/uniqueId.js +23 -0
  468. package/dist/esm/util/validateFields.js +100 -0
  469. package/dist/esm/verify/index.js +36 -0
  470. package/dist/esm/verify/isArguments.js +18 -0
  471. package/dist/esm/verify/isArray.js +18 -0
  472. package/dist/esm/verify/isArrayBuffer.js +18 -0
  473. package/dist/esm/verify/isArrayLike.js +25 -0
  474. package/dist/esm/verify/isBoolean.js +18 -0
  475. package/dist/esm/verify/isBuffer.js +20 -0
  476. package/dist/esm/verify/isDate.js +18 -0
  477. package/dist/esm/verify/isElement.js +20 -0
  478. package/dist/esm/verify/isEmpty.js +38 -0
  479. package/dist/esm/verify/isEqual.js +24 -0
  480. package/dist/esm/verify/isEqualWith.js +25 -0
  481. package/dist/esm/verify/isError.js +20 -0
  482. package/dist/esm/verify/isFinite.js +22 -0
  483. package/dist/esm/verify/isFunction.js +19 -0
  484. package/dist/esm/verify/isInteger.js +19 -0
  485. package/dist/esm/verify/isLength.js +19 -0
  486. package/dist/esm/verify/isMap.js +18 -0
  487. package/dist/esm/verify/isMatch.js +24 -0
  488. package/dist/esm/verify/isMatchWith.js +25 -0
  489. package/dist/esm/verify/isNaN.js +22 -0
  490. package/dist/esm/verify/isNative.js +22 -0
  491. package/dist/esm/verify/isNil.js +24 -0
  492. package/dist/esm/verify/isNull.js +18 -0
  493. package/dist/esm/verify/isNumber.js +21 -0
  494. package/dist/esm/verify/isObject.js +23 -0
  495. package/dist/esm/verify/isObjectLike.js +27 -0
  496. package/dist/esm/verify/isPlainObject.js +18 -0
  497. package/dist/esm/verify/isRegExp.js +18 -0
  498. package/dist/esm/verify/isSafeInteger.js +24 -0
  499. package/dist/esm/verify/isSet.js +18 -0
  500. package/dist/esm/verify/isString.js +18 -0
  501. package/dist/esm/verify/isSymbol.js +18 -0
  502. package/dist/esm/verify/isTypedArray.js +35 -0
  503. package/dist/esm/verify/isUndefined.js +18 -0
  504. package/dist/esm/verify/isWeakMap.js +18 -0
  505. package/dist/esm/verify/isWeakSet.js +18 -0
  506. package/dist/esm/version.js +14 -0
  507. package/dist/types/_internal/MapCache.d.ts +13 -0
  508. package/dist/types/_internal/assignSources.d.ts +6 -0
  509. package/dist/types/_internal/assignValue.d.ts +6 -0
  510. package/dist/types/_internal/baseClone.d.ts +11 -0
  511. package/dist/types/_internal/baseCollectionKeys.d.ts +12 -0
  512. package/dist/types/_internal/baseDefaultsDeep.d.ts +6 -0
  513. package/dist/types/_internal/baseDifference.d.ts +6 -0
  514. package/dist/types/_internal/baseExtremum.d.ts +6 -0
  515. package/dist/types/_internal/baseExtremumBy.d.ts +7 -0
  516. package/dist/types/_internal/baseFilter.d.ts +7 -0
  517. package/dist/types/_internal/baseFind.d.ts +20 -0
  518. package/dist/types/_internal/baseFlatten.d.ts +6 -0
  519. package/dist/types/_internal/baseForEach.d.ts +6 -0
  520. package/dist/types/_internal/baseForOwn.d.ts +14 -0
  521. package/dist/types/_internal/baseIsEqual.d.ts +10 -0
  522. package/dist/types/_internal/baseIsMatch.d.ts +10 -0
  523. package/dist/types/_internal/baseIteratee.d.ts +7 -0
  524. package/dist/types/_internal/baseKeysIn.d.ts +6 -0
  525. package/dist/types/_internal/baseMap.d.ts +7 -0
  526. package/dist/types/_internal/baseMerge.d.ts +13 -0
  527. package/dist/types/_internal/basePad.d.ts +6 -0
  528. package/dist/types/_internal/basePath.d.ts +20 -0
  529. package/dist/types/_internal/baseRange.d.ts +6 -0
  530. package/dist/types/_internal/baseReduce.d.ts +7 -0
  531. package/dist/types/_internal/baseSum.d.ts +6 -0
  532. package/dist/types/_internal/baseTreeTraverse.d.ts +86 -0
  533. package/dist/types/_internal/baseTrim.d.ts +6 -0
  534. package/dist/types/_internal/baseUnset.d.ts +6 -0
  535. package/dist/types/_internal/baseUpdate.d.ts +6 -0
  536. package/dist/types/_internal/coerceToString.d.ts +6 -0
  537. package/dist/types/_internal/colorMath.d.ts +14 -0
  538. package/dist/types/_internal/compareValues.d.ts +12 -0
  539. package/dist/types/_internal/composePartials.d.ts +8 -0
  540. package/dist/types/_internal/createCompounder.d.ts +6 -0
  541. package/dist/types/_internal/deburr.d.ts +6 -0
  542. package/dist/types/_internal/flattenPaths.d.ts +6 -0
  543. package/dist/types/_internal/htmlEscape.d.ts +12 -0
  544. package/dist/types/_internal/identity.d.ts +6 -0
  545. package/dist/types/_internal/index.d.ts +10 -0
  546. package/dist/types/_internal/isArguments.d.ts +6 -0
  547. package/dist/types/_internal/isArrayLike.d.ts +6 -0
  548. package/dist/types/_internal/isArrayLikeObject.d.ts +6 -0
  549. package/dist/types/_internal/isEmptyValue.d.ts +6 -0
  550. package/dist/types/_internal/isFlattenable.d.ts +6 -0
  551. package/dist/types/_internal/isIndex.d.ts +6 -0
  552. package/dist/types/_internal/isLength.d.ts +6 -0
  553. package/dist/types/_internal/isPlainObject.d.ts +8 -0
  554. package/dist/types/_internal/mergeInto.d.ts +7 -0
  555. package/dist/types/_internal/repeatString.d.ts +6 -0
  556. package/dist/types/_internal/toInteger.d.ts +6 -0
  557. package/dist/types/_internal/toLength.d.ts +6 -0
  558. package/dist/types/_internal/toPath.d.ts +7 -0
  559. package/dist/types/_internal/upperFirst.d.ts +6 -0
  560. package/dist/types/_internal/validateFieldRule.d.ts +26 -0
  561. package/dist/types/_internal/words.d.ts +6 -0
  562. package/dist/types/array/chunk.d.ts +17 -0
  563. package/dist/types/array/compact.d.ts +16 -0
  564. package/dist/types/array/concat.d.ts +17 -0
  565. package/dist/types/array/difference.d.ts +17 -0
  566. package/dist/types/array/differenceBy.d.ts +18 -0
  567. package/dist/types/array/drop.d.ts +17 -0
  568. package/dist/types/array/each.d.ts +18 -0
  569. package/dist/types/array/every.d.ts +21 -0
  570. package/dist/types/array/filter.d.ts +18 -0
  571. package/dist/types/array/find.d.ts +23 -0
  572. package/dist/types/array/findIndex.d.ts +18 -0
  573. package/dist/types/array/findLast.d.ts +18 -0
  574. package/dist/types/array/findLastIndex.d.ts +18 -0
  575. package/dist/types/array/flatten.d.ts +16 -0
  576. package/dist/types/array/flattenDeep.d.ts +16 -0
  577. package/dist/types/array/forEach.d.ts +23 -0
  578. package/dist/types/array/forEachRight.d.ts +20 -0
  579. package/dist/types/array/groupBy.d.ts +18 -0
  580. package/dist/types/array/head.d.ts +16 -0
  581. package/dist/types/array/includes.d.ts +21 -0
  582. package/dist/types/array/index.d.ts +43 -0
  583. package/dist/types/array/intersection.d.ts +16 -0
  584. package/dist/types/array/keyBy.d.ts +24 -0
  585. package/dist/types/array/last.d.ts +16 -0
  586. package/dist/types/array/map.d.ts +18 -0
  587. package/dist/types/array/max.d.ts +16 -0
  588. package/dist/types/array/maxBy.d.ts +18 -0
  589. package/dist/types/array/mean.d.ts +16 -0
  590. package/dist/types/array/meanBy.d.ts +18 -0
  591. package/dist/types/array/min.d.ts +16 -0
  592. package/dist/types/array/minBy.d.ts +18 -0
  593. package/dist/types/array/orderBy.d.ts +23 -0
  594. package/dist/types/array/partition.d.ts +18 -0
  595. package/dist/types/array/reduce.d.ts +19 -0
  596. package/dist/types/array/reduceRight.d.ts +19 -0
  597. package/dist/types/array/some.d.ts +18 -0
  598. package/dist/types/array/sortBy.d.ts +18 -0
  599. package/dist/types/array/sum.d.ts +16 -0
  600. package/dist/types/array/sumBy.d.ts +18 -0
  601. package/dist/types/array/take.d.ts +17 -0
  602. package/dist/types/array/union.d.ts +16 -0
  603. package/dist/types/array/uniq.d.ts +16 -0
  604. package/dist/types/array/uniqBy.d.ts +18 -0
  605. package/dist/types/array/without.d.ts +17 -0
  606. package/dist/types/color/getCssVariable.d.ts +18 -0
  607. package/dist/types/color/getThemePalette.d.ts +28 -0
  608. package/dist/types/color/hexToRgb.d.ts +16 -0
  609. package/dist/types/color/index.d.ts +6 -0
  610. package/dist/types/color/rgbStringToHex.d.ts +16 -0
  611. package/dist/types/color/rgbToHex.d.ts +18 -0
  612. package/dist/types/convert/index.d.ts +13 -0
  613. package/dist/types/convert/toArray.d.ts +19 -0
  614. package/dist/types/convert/toFinite.d.ts +19 -0
  615. package/dist/types/convert/toInteger.d.ts +19 -0
  616. package/dist/types/convert/toLength.d.ts +19 -0
  617. package/dist/types/convert/toLower.d.ts +16 -0
  618. package/dist/types/convert/toNumber.d.ts +19 -0
  619. package/dist/types/convert/toPairs.d.ts +16 -0
  620. package/dist/types/convert/toPairsIn.d.ts +20 -0
  621. package/dist/types/convert/toPath.d.ts +16 -0
  622. package/dist/types/convert/toPlainObject.d.ts +19 -0
  623. package/dist/types/convert/toSafeInteger.d.ts +19 -0
  624. package/dist/types/convert/toString.d.ts +19 -0
  625. package/dist/types/convert/toUpper.d.ts +16 -0
  626. package/dist/types/function/after.d.ts +20 -0
  627. package/dist/types/function/before.d.ts +20 -0
  628. package/dist/types/function/curry.d.ts +27 -0
  629. package/dist/types/function/debounce.d.ts +31 -0
  630. package/dist/types/function/flow.d.ts +18 -0
  631. package/dist/types/function/flowRight.d.ts +18 -0
  632. package/dist/types/function/index.d.ts +11 -0
  633. package/dist/types/function/memoize.d.ts +41 -0
  634. package/dist/types/function/once.d.ts +18 -0
  635. package/dist/types/function/partial.d.ts +26 -0
  636. package/dist/types/function/partialRight.d.ts +25 -0
  637. package/dist/types/function/throttle.d.ts +26 -0
  638. package/dist/types/index.d.ts +10 -0
  639. package/dist/types/object/assign.d.ts +18 -0
  640. package/dist/types/object/clone.d.ts +20 -0
  641. package/dist/types/object/cloneDeep.d.ts +21 -0
  642. package/dist/types/object/cloneDeepWith.d.ts +23 -0
  643. package/dist/types/object/cloneWith.d.ts +23 -0
  644. package/dist/types/object/defaults.d.ts +17 -0
  645. package/dist/types/object/defaultsDeep.d.ts +17 -0
  646. package/dist/types/object/findKey.d.ts +17 -0
  647. package/dist/types/object/findLastKey.d.ts +17 -0
  648. package/dist/types/object/forIn.d.ts +16 -0
  649. package/dist/types/object/forOwn.d.ts +16 -0
  650. package/dist/types/object/fromPairs.d.ts +16 -0
  651. package/dist/types/object/get.d.ts +20 -0
  652. package/dist/types/object/has.d.ts +19 -0
  653. package/dist/types/object/index.d.ts +29 -0
  654. package/dist/types/object/invert.d.ts +16 -0
  655. package/dist/types/object/keys.d.ts +19 -0
  656. package/dist/types/object/mapKeys.d.ts +18 -0
  657. package/dist/types/object/mapValues.d.ts +18 -0
  658. package/dist/types/object/merge.d.ts +20 -0
  659. package/dist/types/object/mergeWith.d.ts +27 -0
  660. package/dist/types/object/omit.d.ts +18 -0
  661. package/dist/types/object/omitBy.d.ts +18 -0
  662. package/dist/types/object/pick.d.ts +18 -0
  663. package/dist/types/object/pickBy.d.ts +18 -0
  664. package/dist/types/object/set.d.ts +23 -0
  665. package/dist/types/object/unset.d.ts +19 -0
  666. package/dist/types/object/update.d.ts +19 -0
  667. package/dist/types/object/updateWith.d.ts +21 -0
  668. package/dist/types/object/values.d.ts +19 -0
  669. package/dist/types/string/camelCase.d.ts +19 -0
  670. package/dist/types/string/capitalize.d.ts +16 -0
  671. package/dist/types/string/endsWith.d.ts +21 -0
  672. package/dist/types/string/escape.d.ts +16 -0
  673. package/dist/types/string/index.d.ts +17 -0
  674. package/dist/types/string/kebabCase.d.ts +20 -0
  675. package/dist/types/string/lowerCase.d.ts +17 -0
  676. package/dist/types/string/pad.d.ts +21 -0
  677. package/dist/types/string/padEnd.d.ts +21 -0
  678. package/dist/types/string/padStart.d.ts +21 -0
  679. package/dist/types/string/repeat.d.ts +20 -0
  680. package/dist/types/string/snakeCase.d.ts +20 -0
  681. package/dist/types/string/startsWith.d.ts +21 -0
  682. package/dist/types/string/trim.d.ts +20 -0
  683. package/dist/types/string/trimEnd.d.ts +20 -0
  684. package/dist/types/string/trimStart.d.ts +20 -0
  685. package/dist/types/string/unescape.d.ts +16 -0
  686. package/dist/types/string/upperFirst.d.ts +16 -0
  687. package/dist/types/tree/filterTreeNodes.d.ts +29 -0
  688. package/dist/types/tree/findTreeNode.d.ts +22 -0
  689. package/dist/types/tree/forEachTree.d.ts +25 -0
  690. package/dist/types/tree/getParentNodes.d.ts +26 -0
  691. package/dist/types/tree/getTreeDepth.d.ts +22 -0
  692. package/dist/types/tree/index.d.ts +14 -0
  693. package/dist/types/tree/mapTree.d.ts +23 -0
  694. package/dist/types/tree/pruneTree.d.ts +32 -0
  695. package/dist/types/tree/toFlatList.d.ts +26 -0
  696. package/dist/types/tree/toTree.d.ts +22 -0
  697. package/dist/types/tree/traverseTree.d.ts +22 -0
  698. package/dist/types/tree/traverseTreeBfs.d.ts +22 -0
  699. package/dist/types/util/clamp.d.ts +18 -0
  700. package/dist/types/util/constant.d.ts +16 -0
  701. package/dist/types/util/defaultTo.d.ts +23 -0
  702. package/dist/types/util/defer.d.ts +16 -0
  703. package/dist/types/util/delay.d.ts +17 -0
  704. package/dist/types/util/identity.d.ts +17 -0
  705. package/dist/types/util/inRange.d.ts +18 -0
  706. package/dist/types/util/index.d.ts +22 -0
  707. package/dist/types/util/iteratee.d.ts +17 -0
  708. package/dist/types/util/matches.d.ts +16 -0
  709. package/dist/types/util/matchesProperty.d.ts +17 -0
  710. package/dist/types/util/negate.d.ts +16 -0
  711. package/dist/types/util/noop.d.ts +15 -0
  712. package/dist/types/util/now.d.ts +15 -0
  713. package/dist/types/util/property.d.ts +16 -0
  714. package/dist/types/util/random.d.ts +18 -0
  715. package/dist/types/util/range.d.ts +18 -0
  716. package/dist/types/util/size.d.ts +22 -0
  717. package/dist/types/util/sleep.d.ts +15 -0
  718. package/dist/types/util/times.d.ts +17 -0
  719. package/dist/types/util/uniqueId.d.ts +19 -0
  720. package/dist/types/util/validateFields.d.ts +46 -0
  721. package/dist/types/verify/index.d.ts +36 -0
  722. package/dist/types/verify/isArguments.d.ts +18 -0
  723. package/dist/types/verify/isArray.d.ts +16 -0
  724. package/dist/types/verify/isArrayBuffer.d.ts +16 -0
  725. package/dist/types/verify/isArrayLike.d.ts +24 -0
  726. package/dist/types/verify/isBoolean.d.ts +16 -0
  727. package/dist/types/verify/isBuffer.d.ts +17 -0
  728. package/dist/types/verify/isDate.d.ts +16 -0
  729. package/dist/types/verify/isElement.d.ts +17 -0
  730. package/dist/types/verify/isEmpty.d.ts +21 -0
  731. package/dist/types/verify/isEqual.d.ts +21 -0
  732. package/dist/types/verify/isEqualWith.d.ts +24 -0
  733. package/dist/types/verify/isError.d.ts +18 -0
  734. package/dist/types/verify/isFinite.d.ts +19 -0
  735. package/dist/types/verify/isFunction.d.ts +16 -0
  736. package/dist/types/verify/isInteger.d.ts +17 -0
  737. package/dist/types/verify/isLength.d.ts +19 -0
  738. package/dist/types/verify/isMap.d.ts +16 -0
  739. package/dist/types/verify/isMatch.d.ts +21 -0
  740. package/dist/types/verify/isMatchWith.d.ts +24 -0
  741. package/dist/types/verify/isNaN.d.ts +19 -0
  742. package/dist/types/verify/isNative.d.ts +19 -0
  743. package/dist/types/verify/isNil.d.ts +22 -0
  744. package/dist/types/verify/isNull.d.ts +16 -0
  745. package/dist/types/verify/isNumber.d.ts +19 -0
  746. package/dist/types/verify/isObject.d.ts +20 -0
  747. package/dist/types/verify/isObjectLike.d.ts +25 -0
  748. package/dist/types/verify/isPlainObject.d.ts +18 -0
  749. package/dist/types/verify/isRegExp.d.ts +16 -0
  750. package/dist/types/verify/isSafeInteger.d.ts +19 -0
  751. package/dist/types/verify/isSet.d.ts +16 -0
  752. package/dist/types/verify/isString.d.ts +16 -0
  753. package/dist/types/verify/isSymbol.d.ts +16 -0
  754. package/dist/types/verify/isTypedArray.d.ts +19 -0
  755. package/dist/types/verify/isUndefined.d.ts +16 -0
  756. package/dist/types/verify/isWeakMap.d.ts +16 -0
  757. package/dist/types/verify/isWeakSet.d.ts +16 -0
  758. package/dist/types/version.d.ts +13 -0
  759. package/dist/umd/zhiaiwan-utils.js +8178 -0
  760. package/dist/umd/zhiaiwan-utils.min.js +2 -0
  761. package/package.json +99 -0
@@ -0,0 +1,153 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.baseFind = baseFind;
7
+ exports.baseFindIndex = baseFindIndex;
8
+ exports.baseFindKey = baseFindKey;
9
+ const isArrayLike_1 = __importDefault(require("./isArrayLike"));
10
+ function defaultPredicate(value) {
11
+ return Boolean(value);
12
+ }
13
+ function resolveFromIndex(fromIndex, length) {
14
+ return fromIndex < 0 ? Math.max(length + fromIndex, 0) : fromIndex;
15
+ }
16
+ function resolveFromLastIndex(fromIndex, length) {
17
+ if (fromIndex == null) {
18
+ return length - 1;
19
+ }
20
+ const index = fromIndex < 0 ? length + fromIndex : fromIndex;
21
+ return Math.min(Math.max(index, 0), Math.max(length - 1, 0));
22
+ }
23
+ /**
24
+ * 在集合中查找首个匹配元素;fromIndex 仅对类数组生效。
25
+ *
26
+ * @internal
27
+ */
28
+ function baseFind(collection, predicate = defaultPredicate, fromIndex, fromRight = false) {
29
+ var _a;
30
+ if (collection == null) {
31
+ return undefined;
32
+ }
33
+ if (typeof collection === 'string') {
34
+ const chars = [...collection];
35
+ const length = chars.length;
36
+ if (fromRight) {
37
+ const start = resolveFromLastIndex(fromIndex, length);
38
+ for (let index = start; index >= 0; index--) {
39
+ if (predicate(chars[index], index, collection)) {
40
+ return chars[index];
41
+ }
42
+ }
43
+ return undefined;
44
+ }
45
+ const start = resolveFromIndex(fromIndex !== null && fromIndex !== void 0 ? fromIndex : 0, length);
46
+ for (let index = start; index < length; index++) {
47
+ if (predicate(chars[index], index, collection)) {
48
+ return chars[index];
49
+ }
50
+ }
51
+ return undefined;
52
+ }
53
+ if (Array.isArray(collection)) {
54
+ const length = collection.length;
55
+ if (fromRight) {
56
+ const start = resolveFromLastIndex(fromIndex, length);
57
+ for (let index = start; index >= 0; index--) {
58
+ if (predicate(collection[index], index, collection)) {
59
+ return collection[index];
60
+ }
61
+ }
62
+ return undefined;
63
+ }
64
+ const start = resolveFromIndex(fromIndex !== null && fromIndex !== void 0 ? fromIndex : 0, length);
65
+ for (let index = start; index < length; index++) {
66
+ if (predicate(collection[index], index, collection)) {
67
+ return collection[index];
68
+ }
69
+ }
70
+ return undefined;
71
+ }
72
+ if ((0, isArrayLike_1.default)(collection)) {
73
+ const arrayLike = collection;
74
+ const length = (_a = arrayLike.length) !== null && _a !== void 0 ? _a : 0;
75
+ if (fromRight) {
76
+ const start = resolveFromLastIndex(fromIndex, length);
77
+ for (let index = start; index >= 0; index--) {
78
+ if (predicate(arrayLike[index], index, collection)) {
79
+ return arrayLike[index];
80
+ }
81
+ }
82
+ return undefined;
83
+ }
84
+ const start = resolveFromIndex(fromIndex !== null && fromIndex !== void 0 ? fromIndex : 0, length);
85
+ for (let index = start; index < length; index++) {
86
+ if (predicate(arrayLike[index], index, collection)) {
87
+ return arrayLike[index];
88
+ }
89
+ }
90
+ return undefined;
91
+ }
92
+ if (typeof collection === 'object') {
93
+ const keys = Object.keys(collection);
94
+ const orderedKeys = fromRight ? [...keys].reverse() : keys;
95
+ for (const key of orderedKeys) {
96
+ const value = collection[key];
97
+ if (predicate(value, key, collection)) {
98
+ return value;
99
+ }
100
+ }
101
+ }
102
+ return undefined;
103
+ }
104
+ /**
105
+ * 在类数组中查找首个匹配下标。
106
+ *
107
+ * @internal
108
+ */
109
+ function baseFindIndex(array, predicate = defaultPredicate, fromIndex, fromRight = false) {
110
+ var _a;
111
+ if (array == null || !(0, isArrayLike_1.default)(array)) {
112
+ return -1;
113
+ }
114
+ const arrayLike = array;
115
+ const length = (_a = arrayLike.length) !== null && _a !== void 0 ? _a : 0;
116
+ if (!length) {
117
+ return -1;
118
+ }
119
+ if (fromRight) {
120
+ const start = resolveFromLastIndex(fromIndex, length);
121
+ for (let index = start; index >= 0; index--) {
122
+ if (predicate(arrayLike[index], index, array)) {
123
+ return index;
124
+ }
125
+ }
126
+ return -1;
127
+ }
128
+ const start = resolveFromIndex(fromIndex !== null && fromIndex !== void 0 ? fromIndex : 0, length);
129
+ for (let index = start; index < length; index++) {
130
+ if (predicate(arrayLike[index], index, array)) {
131
+ return index;
132
+ }
133
+ }
134
+ return -1;
135
+ }
136
+ /**
137
+ * 在对象中查找首个匹配键名。
138
+ *
139
+ * @internal
140
+ */
141
+ function baseFindKey(object, predicate = defaultPredicate, fromRight = false) {
142
+ if (object == null) {
143
+ return undefined;
144
+ }
145
+ const keys = Object.keys(object);
146
+ const orderedKeys = fromRight ? [...keys].reverse() : keys;
147
+ for (const key of orderedKeys) {
148
+ if (predicate(object[key], key, object)) {
149
+ return key;
150
+ }
151
+ }
152
+ return undefined;
153
+ }
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.default = baseFlatten;
7
+ const isFlattenable_1 = __importDefault(require("./isFlattenable"));
8
+ /**
9
+ * 按指定深度展平数组,语义对齐 Lodash baseFlatten。
10
+ *
11
+ * @internal
12
+ */
13
+ function baseFlatten(array, depth, result = []) {
14
+ for (let index = 0; index < array.length; index++) {
15
+ const value = array[index];
16
+ if (depth > 0 && (0, isFlattenable_1.default)(value)) {
17
+ const nested = value;
18
+ if (depth > 1) {
19
+ baseFlatten(nested, depth - 1, result);
20
+ }
21
+ else {
22
+ for (let nestedIndex = 0; nestedIndex < nested.length; nestedIndex++) {
23
+ result.push(nested[nestedIndex]);
24
+ }
25
+ }
26
+ }
27
+ else {
28
+ result.push(value);
29
+ }
30
+ }
31
+ return result;
32
+ }
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.default = baseForEach;
7
+ const isArrayLike_1 = __importDefault(require("./isArrayLike"));
8
+ /**
9
+ * iteratee 仅在为 false 时中断,与 Lodash forEach 语义一致。
10
+ *
11
+ * @internal
12
+ */
13
+ function shouldBreak(result) {
14
+ return result === false;
15
+ }
16
+ /**
17
+ * 集合遍历内核;fromRight 控制逆序。
18
+ *
19
+ * @internal
20
+ */
21
+ function baseForEach(collection, iteratee, fromRight = false) {
22
+ var _a;
23
+ if (collection == null) {
24
+ return collection;
25
+ }
26
+ if (typeof collection === 'string') {
27
+ const chars = [...collection];
28
+ const length = chars.length;
29
+ if (fromRight) {
30
+ for (let i = length - 1; i >= 0; i--) {
31
+ if (shouldBreak(iteratee(chars[i], i, collection))) {
32
+ break;
33
+ }
34
+ }
35
+ }
36
+ else {
37
+ for (let i = 0; i < length; i++) {
38
+ if (shouldBreak(iteratee(chars[i], i, collection))) {
39
+ break;
40
+ }
41
+ }
42
+ }
43
+ return collection;
44
+ }
45
+ if (Array.isArray(collection)) {
46
+ const length = collection.length;
47
+ if (fromRight) {
48
+ for (let i = length - 1; i >= 0; i--) {
49
+ if (shouldBreak(iteratee(collection[i], i, collection))) {
50
+ break;
51
+ }
52
+ }
53
+ }
54
+ else {
55
+ for (let i = 0; i < length; i++) {
56
+ if (shouldBreak(iteratee(collection[i], i, collection))) {
57
+ break;
58
+ }
59
+ }
60
+ }
61
+ return collection;
62
+ }
63
+ if ((0, isArrayLike_1.default)(collection)) {
64
+ const arrayLike = collection;
65
+ const length = (_a = arrayLike.length) !== null && _a !== void 0 ? _a : 0;
66
+ if (fromRight) {
67
+ for (let i = length - 1; i >= 0; i--) {
68
+ if (shouldBreak(iteratee(arrayLike[i], i, collection))) {
69
+ break;
70
+ }
71
+ }
72
+ }
73
+ else {
74
+ for (let i = 0; i < length; i++) {
75
+ if (shouldBreak(iteratee(arrayLike[i], i, collection))) {
76
+ break;
77
+ }
78
+ }
79
+ }
80
+ return collection;
81
+ }
82
+ if (typeof collection === 'object') {
83
+ const keys = Object.keys(collection);
84
+ const orderedKeys = fromRight ? [...keys].reverse() : keys;
85
+ for (const key of orderedKeys) {
86
+ if (shouldBreak(iteratee(collection[key], key, collection))) {
87
+ break;
88
+ }
89
+ }
90
+ }
91
+ return collection;
92
+ }
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.baseForOwn = baseForOwn;
7
+ exports.baseForIn = baseForIn;
8
+ const baseCollectionKeys_1 = require("./baseCollectionKeys");
9
+ const baseKeysIn_1 = __importDefault(require("./baseKeysIn"));
10
+ function baseFor(object, iteratee, keysProvider) {
11
+ for (const key of keysProvider(object)) {
12
+ if (iteratee(object[key], key, object) === false) {
13
+ break;
14
+ }
15
+ }
16
+ return object;
17
+ }
18
+ /**
19
+ * 遍历对象自有可枚举属性,对齐 Lodash baseForOwn。
20
+ *
21
+ * @internal
22
+ */
23
+ function baseForOwn(object, iteratee) {
24
+ return baseFor(object, iteratee, baseCollectionKeys_1.baseKeys);
25
+ }
26
+ /**
27
+ * 遍历对象自有与继承的可枚举属性,对齐 Lodash forIn 内核。
28
+ *
29
+ * @internal
30
+ */
31
+ function baseForIn(object, iteratee) {
32
+ return baseFor(object, iteratee, baseKeysIn_1.default);
33
+ }
@@ -0,0 +1,161 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = baseIsEqual;
4
+ function compareArrayBuffer(left, right) {
5
+ if (left.byteLength !== right.byteLength) {
6
+ return false;
7
+ }
8
+ const leftView = new Uint8Array(left);
9
+ const rightView = new Uint8Array(right);
10
+ for (let i = 0; i < leftView.length; i++) {
11
+ if (leftView[i] !== rightView[i]) {
12
+ return false;
13
+ }
14
+ }
15
+ return true;
16
+ }
17
+ function isArrayBufferLike(value) {
18
+ return (value instanceof ArrayBuffer ||
19
+ (typeof SharedArrayBuffer !== 'undefined' && value instanceof SharedArrayBuffer));
20
+ }
21
+ function isBoxedPrimitive(value) {
22
+ return value instanceof Boolean || value instanceof Number || value instanceof String;
23
+ }
24
+ /**
25
+ * 深比较实现,对齐 Lodash baseIsEqual 的常见类型与 customizer 语义。
26
+ *
27
+ * @internal
28
+ */
29
+ function baseIsEqual(value, other, seen, options = {}, key, object) {
30
+ const { customizer } = options;
31
+ if (customizer) {
32
+ const customized = customizer(value, other, key, object, seen);
33
+ if (customized !== undefined) {
34
+ return customized;
35
+ }
36
+ }
37
+ if (Object.is(value, other)) {
38
+ return true;
39
+ }
40
+ if (value == null || other == null) {
41
+ return false;
42
+ }
43
+ if (isBoxedPrimitive(value) || isBoxedPrimitive(other)) {
44
+ if (!isBoxedPrimitive(value) || !isBoxedPrimitive(other)) {
45
+ return false;
46
+ }
47
+ return Object.is(value.valueOf(), other.valueOf());
48
+ }
49
+ if (typeof value !== 'object' || typeof other !== 'object') {
50
+ return false;
51
+ }
52
+ const valueObj = value;
53
+ const otherObj = other;
54
+ const cached = seen.get(valueObj);
55
+ if (cached === otherObj) {
56
+ return true;
57
+ }
58
+ seen.set(valueObj, otherObj);
59
+ if (value instanceof Date && other instanceof Date) {
60
+ return value.getTime() === other.getTime();
61
+ }
62
+ if (value instanceof RegExp && other instanceof RegExp) {
63
+ return value.source === other.source && value.flags === other.flags;
64
+ }
65
+ if (isArrayBufferLike(value) && isArrayBufferLike(other)) {
66
+ return compareArrayBuffer(value, other);
67
+ }
68
+ if (value instanceof DataView && other instanceof DataView) {
69
+ return (value.byteOffset === other.byteOffset &&
70
+ value.byteLength === other.byteLength &&
71
+ compareArrayBuffer(value.buffer, other.buffer));
72
+ }
73
+ if (ArrayBuffer.isView(value) && ArrayBuffer.isView(other)) {
74
+ if (value.constructor !== other.constructor) {
75
+ return false;
76
+ }
77
+ const left = value;
78
+ const right = other;
79
+ if (left.byteLength !== right.byteLength) {
80
+ return false;
81
+ }
82
+ for (let i = 0; i < left.byteLength; i++) {
83
+ if (left[i] !== right[i]) {
84
+ return false;
85
+ }
86
+ }
87
+ return true;
88
+ }
89
+ if (Array.isArray(value)) {
90
+ if (!Array.isArray(other) || value.length !== other.length) {
91
+ return false;
92
+ }
93
+ for (let i = 0; i < value.length; i++) {
94
+ if (!baseIsEqual(value[i], other[i], seen, options, i, valueObj)) {
95
+ return false;
96
+ }
97
+ }
98
+ return true;
99
+ }
100
+ if (value instanceof Map && other instanceof Map) {
101
+ if (value.size !== other.size) {
102
+ return false;
103
+ }
104
+ const otherEntries = [...other.entries()];
105
+ const matched = new Set();
106
+ outer: for (const [mapKey, mapValue] of value.entries()) {
107
+ for (let i = 0; i < otherEntries.length; i++) {
108
+ if (matched.has(i)) {
109
+ continue;
110
+ }
111
+ const [otherKey, otherVal] = otherEntries[i];
112
+ if (baseIsEqual(mapKey, otherKey, seen, options, undefined, valueObj) &&
113
+ baseIsEqual(mapValue, otherVal, seen, options, undefined, valueObj)) {
114
+ matched.add(i);
115
+ continue outer;
116
+ }
117
+ }
118
+ return false;
119
+ }
120
+ return true;
121
+ }
122
+ if (value instanceof Set && other instanceof Set) {
123
+ if (value.size !== other.size) {
124
+ return false;
125
+ }
126
+ const otherValues = [...other.values()];
127
+ const matched = new Set();
128
+ outer: for (const setValue of value.values()) {
129
+ for (let i = 0; i < otherValues.length; i++) {
130
+ if (matched.has(i)) {
131
+ continue;
132
+ }
133
+ if (baseIsEqual(setValue, otherValues[i], seen, options, undefined, valueObj)) {
134
+ matched.add(i);
135
+ continue outer;
136
+ }
137
+ }
138
+ return false;
139
+ }
140
+ return true;
141
+ }
142
+ if (Object.getPrototypeOf(value) !== Object.getPrototypeOf(other)) {
143
+ return false;
144
+ }
145
+ const valueKeys = Reflect.ownKeys(value);
146
+ const otherKeys = Reflect.ownKeys(other);
147
+ if (valueKeys.length !== otherKeys.length) {
148
+ return false;
149
+ }
150
+ for (const currentKey of valueKeys) {
151
+ if (!Object.prototype.hasOwnProperty.call(other, currentKey)) {
152
+ return false;
153
+ }
154
+ const left = value[currentKey];
155
+ const right = other[currentKey];
156
+ if (!baseIsEqual(left, right, seen, options, currentKey, valueObj)) {
157
+ return false;
158
+ }
159
+ }
160
+ return true;
161
+ }
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.default = baseIsMatch;
7
+ const baseIsEqual_1 = __importDefault(require("./baseIsEqual"));
8
+ function isMatchableObject(value) {
9
+ return typeof value === 'object' && value !== null;
10
+ }
11
+ function matchValues(objectValue, sourceValue, options, key, object, source) {
12
+ const { customizer } = options;
13
+ if (customizer) {
14
+ const customized = customizer(objectValue, sourceValue, key, object, source);
15
+ if (customized !== undefined) {
16
+ return customized;
17
+ }
18
+ }
19
+ if (sourceValue == null) {
20
+ return objectValue == null;
21
+ }
22
+ if (!isMatchableObject(sourceValue)) {
23
+ return Object.is(objectValue, sourceValue);
24
+ }
25
+ if (Array.isArray(sourceValue)) {
26
+ if (!Array.isArray(objectValue) || sourceValue.length !== objectValue.length) {
27
+ return false;
28
+ }
29
+ for (let i = 0; i < sourceValue.length; i++) {
30
+ if (!matchValues(objectValue[i], sourceValue[i], options, i, objectValue, sourceValue)) {
31
+ return false;
32
+ }
33
+ }
34
+ return true;
35
+ }
36
+ if (sourceValue instanceof Date) {
37
+ return objectValue instanceof Date && objectValue.getTime() === sourceValue.getTime();
38
+ }
39
+ if (sourceValue instanceof RegExp) {
40
+ return (objectValue instanceof RegExp &&
41
+ objectValue.source === sourceValue.source &&
42
+ objectValue.flags === sourceValue.flags);
43
+ }
44
+ if (sourceValue instanceof Map || sourceValue instanceof Set) {
45
+ return (0, baseIsEqual_1.default)(objectValue, sourceValue, new WeakMap());
46
+ }
47
+ if (isMatchableObject(objectValue)) {
48
+ return baseIsMatch(objectValue, sourceValue, options);
49
+ }
50
+ return Object.is(objectValue, sourceValue);
51
+ }
52
+ /**
53
+ * 判断 object 是否包含 source 定义的全部属性值(部分匹配)。
54
+ *
55
+ * @internal
56
+ */
57
+ function baseIsMatch(object, source, options = {}) {
58
+ if (source == null) {
59
+ return true;
60
+ }
61
+ if (object == null) {
62
+ return false;
63
+ }
64
+ if (!isMatchableObject(source)) {
65
+ return Object.is(object, source);
66
+ }
67
+ if (Array.isArray(source)) {
68
+ return matchValues(object, source, options);
69
+ }
70
+ const sourceObj = source;
71
+ const objectObj = object;
72
+ for (const key of Reflect.ownKeys(sourceObj)) {
73
+ const sourceValue = sourceObj[key];
74
+ const objectValue = objectObj[key];
75
+ if (!matchValues(objectValue, sourceValue, options, key, objectObj, sourceObj)) {
76
+ return false;
77
+ }
78
+ }
79
+ return true;
80
+ }
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.default = baseIteratee;
7
+ const baseIsMatch_1 = __importDefault(require("./baseIsMatch"));
8
+ const identity_1 = __importDefault(require("./identity"));
9
+ const toPath_1 = __importDefault(require("./toPath"));
10
+ function getProperty(object, path) {
11
+ if (object == null) {
12
+ return undefined;
13
+ }
14
+ const keys = (0, toPath_1.default)(path);
15
+ let current = object;
16
+ for (const key of keys) {
17
+ if (current == null) {
18
+ return undefined;
19
+ }
20
+ current = current[key];
21
+ }
22
+ return current;
23
+ }
24
+ /**
25
+ * 将 Lodash 风格 iteratee 简写解析为统一回调。
26
+ *
27
+ * @internal
28
+ */
29
+ function baseIteratee(iteratee = identity_1.default) {
30
+ if (iteratee == null) {
31
+ return identity_1.default;
32
+ }
33
+ if (typeof iteratee === 'function') {
34
+ return iteratee;
35
+ }
36
+ if (Array.isArray(iteratee)) {
37
+ const path = iteratee[0];
38
+ const matchValue = iteratee[1];
39
+ return (value) => Object.is(getProperty(value, path), matchValue);
40
+ }
41
+ if (typeof iteratee === 'object') {
42
+ const source = iteratee;
43
+ return (value) => (0, baseIsMatch_1.default)(value, source);
44
+ }
45
+ return (value) => getProperty(value, iteratee);
46
+ }
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.default = baseKeysIn;
7
+ const baseCollectionKeys_1 = require("./baseCollectionKeys");
8
+ const isArrayLike_1 = __importDefault(require("./isArrayLike"));
9
+ const objectProto = Object.prototype;
10
+ const hasOwnProperty = objectProto.hasOwnProperty;
11
+ function isPrototype(value) {
12
+ const ctor = value.constructor;
13
+ const proto = ctor === null || ctor === void 0 ? void 0 : ctor.prototype;
14
+ return value === proto;
15
+ }
16
+ /**
17
+ * 返回对象自有与继承的可枚举键名,语义对齐 Lodash keysIn。
18
+ *
19
+ * @internal
20
+ */
21
+ function baseKeysIn(object) {
22
+ if (object == null) {
23
+ return [];
24
+ }
25
+ if ((0, isArrayLike_1.default)(object)) {
26
+ return (0, baseCollectionKeys_1.baseKeys)(object);
27
+ }
28
+ if (typeof object !== 'object') {
29
+ const result = [];
30
+ const wrapped = Object(object);
31
+ for (const key in wrapped) {
32
+ result.push(key);
33
+ }
34
+ return result;
35
+ }
36
+ const isProto = isPrototype(object);
37
+ const result = [];
38
+ for (const key in object) {
39
+ if (!(key === 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
40
+ result.push(key);
41
+ }
42
+ }
43
+ return result;
44
+ }
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.default = baseMap;
7
+ const isArrayLike_1 = __importDefault(require("./isArrayLike"));
8
+ const baseIteratee_1 = __importDefault(require("./baseIteratee"));
9
+ /**
10
+ * 遍历集合并映射为新数组,语义对齐 Lodash map。
11
+ *
12
+ * @internal
13
+ */
14
+ function baseMap(collection, iteratee = (0, baseIteratee_1.default)()) {
15
+ var _a;
16
+ const resolvedIteratee = (0, baseIteratee_1.default)(iteratee);
17
+ const result = [];
18
+ if (collection == null) {
19
+ return result;
20
+ }
21
+ if (typeof collection === 'string') {
22
+ const chars = [...collection];
23
+ for (let index = 0; index < chars.length; index++) {
24
+ result.push(resolvedIteratee(chars[index], index, collection));
25
+ }
26
+ return result;
27
+ }
28
+ if (Array.isArray(collection)) {
29
+ for (let index = 0; index < collection.length; index++) {
30
+ result.push(resolvedIteratee(collection[index], index, collection));
31
+ }
32
+ return result;
33
+ }
34
+ if ((0, isArrayLike_1.default)(collection)) {
35
+ const arrayLike = collection;
36
+ const length = (_a = arrayLike.length) !== null && _a !== void 0 ? _a : 0;
37
+ for (let index = 0; index < length; index++) {
38
+ result.push(resolvedIteratee(arrayLike[index], index, collection));
39
+ }
40
+ return result;
41
+ }
42
+ if (typeof collection === 'object') {
43
+ const keys = Object.keys(collection);
44
+ for (const key of keys) {
45
+ result.push(resolvedIteratee(collection[key], key, collection));
46
+ }
47
+ }
48
+ return result;
49
+ }