@visactor/vutils 1.0.24 → 1.0.25

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 (435) hide show
  1. package/README.zh-CN.md +12 -0
  2. package/cjs/angle.d.ts +61 -0
  3. package/cjs/angle.js +73 -7
  4. package/cjs/angle.js.map +1 -1
  5. package/cjs/color/Color.d.ts +3 -0
  6. package/cjs/color/Color.js +64 -10
  7. package/cjs/color/Color.js.map +1 -1
  8. package/cjs/color/hexToRgb.d.ts +5 -0
  9. package/cjs/color/hexToRgb.js +5 -0
  10. package/cjs/color/hexToRgb.js.map +1 -1
  11. package/cjs/color/rgbToHsl.js +5 -1
  12. package/cjs/color/rgbToHsl.js.map +1 -1
  13. package/cjs/common/array.d.ts +43 -0
  14. package/cjs/common/array.js +44 -0
  15. package/cjs/common/array.js.map +1 -1
  16. package/cjs/common/ascending.js +1 -2
  17. package/cjs/common/bisect.d.ts +21 -0
  18. package/cjs/common/bisect.js +29 -0
  19. package/cjs/common/bisect.js.map +1 -1
  20. package/cjs/common/bootstrap.d.ts +5 -0
  21. package/cjs/common/bootstrap.js +22 -0
  22. package/cjs/common/bootstrap.js.map +1 -0
  23. package/cjs/common/clone.js +6 -0
  24. package/cjs/common/clone.js.map +1 -1
  25. package/cjs/common/cloneDeep.js +4 -1
  26. package/cjs/common/cloneDeep.js.map +1 -1
  27. package/cjs/common/correlation.d.ts +3 -0
  28. package/cjs/common/correlation.js +83 -0
  29. package/cjs/common/correlation.js.map +1 -0
  30. package/cjs/common/debounce.js +22 -4
  31. package/cjs/common/debounce.js.map +1 -1
  32. package/cjs/common/ecdf.d.ts +8 -0
  33. package/cjs/common/ecdf.js +11 -2
  34. package/cjs/common/ecdf.js.map +1 -1
  35. package/cjs/common/extent.d.ts +4 -0
  36. package/cjs/common/extent.js +4 -2
  37. package/cjs/common/extent.js.map +1 -1
  38. package/cjs/common/field.d.ts +6 -0
  39. package/cjs/common/field.js +3 -0
  40. package/cjs/common/field.js.map +1 -1
  41. package/cjs/common/getType.js +1 -2
  42. package/cjs/common/has.d.ts +17 -0
  43. package/cjs/common/has.js +18 -1
  44. package/cjs/common/has.js.map +1 -1
  45. package/cjs/common/index.d.ts +4 -0
  46. package/cjs/common/index.js +33 -6
  47. package/cjs/common/index.js.map +1 -1
  48. package/cjs/common/interpolate.js +16 -3
  49. package/cjs/common/interpolate.js.map +1 -1
  50. package/cjs/common/isBase64.d.ts +6 -0
  51. package/cjs/common/isBase64.js +6 -0
  52. package/cjs/common/isBase64.js.map +1 -1
  53. package/cjs/common/isBoolean.d.ts +13 -0
  54. package/cjs/common/isBoolean.js +13 -1
  55. package/cjs/common/isBoolean.js.map +1 -1
  56. package/cjs/common/isEmpty.js +11 -1
  57. package/cjs/common/isEmpty.js.map +1 -1
  58. package/cjs/common/isEqual.js +19 -7
  59. package/cjs/common/isEqual.js.map +1 -1
  60. package/cjs/common/isFunction.d.ts +25 -0
  61. package/cjs/common/isFunction.js +26 -0
  62. package/cjs/common/isFunction.js.map +1 -1
  63. package/cjs/common/isNull.js +2 -1
  64. package/cjs/common/isNumber.d.ts +23 -0
  65. package/cjs/common/isNumber.js +23 -1
  66. package/cjs/common/isNumber.js.map +1 -1
  67. package/cjs/common/isNumeric.d.ts +25 -0
  68. package/cjs/common/isNumeric.js +25 -0
  69. package/cjs/common/isNumeric.js.map +1 -1
  70. package/cjs/common/isObject.d.ts +21 -0
  71. package/cjs/common/isObject.js +23 -2
  72. package/cjs/common/isObject.js.map +1 -1
  73. package/cjs/common/isObjectLike.d.ts +20 -0
  74. package/cjs/common/isObjectLike.js +21 -0
  75. package/cjs/common/isObjectLike.js.map +1 -1
  76. package/cjs/common/isPlainObject.d.ts +25 -0
  77. package/cjs/common/isPlainObject.js.map +1 -1
  78. package/cjs/common/isShallowEqual.js +2 -1
  79. package/cjs/common/isShallowEqual.js.map +1 -1
  80. package/cjs/common/isString.d.ts +13 -0
  81. package/cjs/common/isString.js +14 -2
  82. package/cjs/common/isString.js.map +1 -1
  83. package/cjs/common/isType.d.ts +6 -0
  84. package/cjs/common/isType.js +7 -1
  85. package/cjs/common/isType.js.map +1 -1
  86. package/cjs/common/isValidNumber.js.map +1 -1
  87. package/cjs/common/isValidUrl.js.map +1 -1
  88. package/cjs/common/kde.d.ts +28 -0
  89. package/cjs/common/kde.js +29 -5
  90. package/cjs/common/kde.js.map +1 -1
  91. package/cjs/common/mean.d.ts +2 -0
  92. package/cjs/common/mean.js +25 -0
  93. package/cjs/common/mean.js.map +1 -0
  94. package/cjs/common/merge.js +20 -4
  95. package/cjs/common/merge.js.map +1 -1
  96. package/cjs/common/mixin.js +14 -3
  97. package/cjs/common/mixin.js.map +1 -1
  98. package/cjs/common/normalQuantile.d.ts +5 -0
  99. package/cjs/common/normalQuantile.js +21 -0
  100. package/cjs/common/normalQuantile.js.map +1 -0
  101. package/cjs/common/number.d.ts +24 -0
  102. package/cjs/common/number.js +24 -1
  103. package/cjs/common/number.js.map +1 -1
  104. package/cjs/common/pad.d.ts +21 -0
  105. package/cjs/common/pad.js +21 -1
  106. package/cjs/common/pad.js.map +1 -1
  107. package/cjs/common/random.d.ts +3 -0
  108. package/cjs/common/random.js +13 -0
  109. package/cjs/common/random.js.map +1 -1
  110. package/cjs/common/regression-linear.d.ts +4 -0
  111. package/cjs/common/regression-linear.js +19 -12
  112. package/cjs/common/regression-linear.js.map +1 -1
  113. package/cjs/common/regression-logistic.d.ts +6 -0
  114. package/cjs/common/regression-logistic.js +25 -14
  115. package/cjs/common/regression-logistic.js.map +1 -1
  116. package/cjs/common/regression-lowess.d.ts +9 -0
  117. package/cjs/common/regression-lowess.js +51 -23
  118. package/cjs/common/regression-lowess.js.map +1 -1
  119. package/cjs/common/regression-polynomial.js +26 -15
  120. package/cjs/common/regression-polynomial.js.map +1 -1
  121. package/cjs/common/regression-utils.d.ts +13 -1
  122. package/cjs/common/regression-utils.js +27 -12
  123. package/cjs/common/regression-utils.js.map +1 -1
  124. package/cjs/common/throttle.js +3 -0
  125. package/cjs/common/throttle.js.map +1 -1
  126. package/cjs/common/toDate.js +22 -3
  127. package/cjs/common/toDate.js.map +1 -1
  128. package/cjs/common/uuid.d.ts +7 -0
  129. package/cjs/common/uuid.js +15 -1
  130. package/cjs/common/uuid.js.map +1 -1
  131. package/cjs/data-structure/bounds.d.ts +101 -0
  132. package/cjs/data-structure/bounds.js +75 -8
  133. package/cjs/data-structure/bounds.js.map +1 -1
  134. package/cjs/data-structure/hashTable.d.ts +4 -0
  135. package/cjs/data-structure/hashTable.js +13 -3
  136. package/cjs/data-structure/hashTable.js.map +1 -1
  137. package/cjs/data-structure/index.js +7 -3
  138. package/cjs/data-structure/index.js.map +1 -1
  139. package/cjs/data-structure/matrix.d.ts +91 -0
  140. package/cjs/data-structure/matrix.js +53 -5
  141. package/cjs/data-structure/matrix.js.map +1 -1
  142. package/cjs/data-structure/point.d.ts +3 -0
  143. package/cjs/data-structure/point.js +6 -2
  144. package/cjs/data-structure/point.js.map +1 -1
  145. package/cjs/dom.d.ts +36 -0
  146. package/cjs/dom.js +43 -1
  147. package/cjs/dom.js.map +1 -1
  148. package/cjs/fmin/blas1.js +10 -1
  149. package/cjs/fmin/blas1.js.map +1 -1
  150. package/cjs/fmin/conjugate-gradient.js +18 -3
  151. package/cjs/fmin/conjugate-gradient.js.map +1 -1
  152. package/cjs/fmin/linesearch.js +15 -1
  153. package/cjs/fmin/linesearch.js.map +1 -1
  154. package/cjs/fmin/nelder-mead.d.ts +1 -0
  155. package/cjs/fmin/nelder-mead.js +30 -10
  156. package/cjs/fmin/nelder-mead.js.map +1 -1
  157. package/cjs/format/number/formatDecimal.js +9 -1
  158. package/cjs/format/number/formatDecimal.js.map +1 -1
  159. package/cjs/format/number/formatGroup.js +7 -0
  160. package/cjs/format/number/formatGroup.js.map +1 -1
  161. package/cjs/format/number/formatPrefixAuto.js +8 -0
  162. package/cjs/format/number/formatPrefixAuto.js.map +1 -1
  163. package/cjs/format/number/formatRounded.js +7 -0
  164. package/cjs/format/number/formatRounded.js.map +1 -1
  165. package/cjs/format/number/formatTrim.js +7 -0
  166. package/cjs/format/number/formatTrim.js.map +1 -1
  167. package/cjs/format/number/number.js +39 -9
  168. package/cjs/format/number/number.js.map +1 -1
  169. package/cjs/format/time.js +23 -6
  170. package/cjs/format/time.js.map +1 -1
  171. package/cjs/geo/circle-intersection.d.ts +12 -0
  172. package/cjs/geo/circle-intersection.js +54 -9
  173. package/cjs/geo/circle-intersection.js.map +1 -1
  174. package/cjs/geo/constant.js +8 -1
  175. package/cjs/geo/constant.js.map +1 -1
  176. package/cjs/geo/invariant.d.ts +22 -0
  177. package/cjs/geo/invariant.js +24 -1
  178. package/cjs/geo/invariant.js.map +1 -1
  179. package/cjs/graphics/algorithm/aabb.js +7 -3
  180. package/cjs/graphics/algorithm/aabb.js.map +1 -1
  181. package/cjs/graphics/algorithm/intersect.d.ts +48 -0
  182. package/cjs/graphics/algorithm/intersect.js +75 -7
  183. package/cjs/graphics/algorithm/intersect.js.map +1 -1
  184. package/cjs/graphics/bounds-util.js +4 -2
  185. package/cjs/graphics/bounds-util.js.map +1 -1
  186. package/cjs/graphics/graph-util.js +4 -0
  187. package/cjs/graphics/graph-util.js.map +1 -1
  188. package/cjs/graphics/index.js +7 -4
  189. package/cjs/graphics/index.js.map +1 -1
  190. package/cjs/graphics/polygon.d.ts +12 -0
  191. package/cjs/graphics/polygon.js +28 -5
  192. package/cjs/graphics/polygon.js.map +1 -1
  193. package/cjs/graphics/text/measure/interface.d.ts +12 -0
  194. package/cjs/graphics/text/measure/textMeasure.d.ts +23 -0
  195. package/cjs/graphics/text/measure/textMeasure.js +50 -22
  196. package/cjs/graphics/text/measure/textMeasure.js.map +1 -1
  197. package/cjs/graphics/text/measure/util.js +1 -0
  198. package/cjs/graphics/text/measure/util.js.map +1 -1
  199. package/cjs/graphics/text/stringWidth.js +7 -3
  200. package/cjs/graphics/text/stringWidth.js.map +1 -1
  201. package/cjs/index.d.ts +6 -0
  202. package/cjs/index.js +19 -4
  203. package/cjs/index.js.map +1 -1
  204. package/cjs/logger.js +12 -2
  205. package/cjs/logger.js.map +1 -1
  206. package/cjs/lru.js +14 -6
  207. package/cjs/lru.js.map +1 -1
  208. package/cjs/math.d.ts +9 -0
  209. package/cjs/math.js +10 -0
  210. package/cjs/math.js.map +1 -1
  211. package/cjs/padding.d.ts +5 -0
  212. package/cjs/padding.js +5 -0
  213. package/cjs/padding.js.map +1 -1
  214. package/cjs/time/formatUtils.d.ts +6 -0
  215. package/cjs/time/formatUtils.js +7 -0
  216. package/cjs/time/formatUtils.js.map +1 -1
  217. package/dist/index.js +1602 -109
  218. package/dist/index.min.js +128 -1
  219. package/es/angle.d.ts +61 -0
  220. package/es/angle.js +66 -10
  221. package/es/angle.js.map +1 -1
  222. package/es/color/Color.d.ts +3 -0
  223. package/es/color/Color.js +64 -9
  224. package/es/color/Color.js.map +1 -1
  225. package/es/color/hexToRgb.d.ts +5 -0
  226. package/es/color/hexToRgb.js +5 -0
  227. package/es/color/hexToRgb.js.map +1 -1
  228. package/es/color/rgbToHsl.js +5 -1
  229. package/es/color/rgbToHsl.js.map +1 -1
  230. package/es/common/array.d.ts +43 -0
  231. package/es/common/array.js +44 -8
  232. package/es/common/array.js.map +1 -1
  233. package/es/common/ascending.js +1 -2
  234. package/es/common/bisect.d.ts +21 -0
  235. package/es/common/bisect.js +29 -4
  236. package/es/common/bisect.js.map +1 -1
  237. package/es/common/bootstrap.d.ts +5 -0
  238. package/es/common/bootstrap.js +14 -0
  239. package/es/common/bootstrap.js.map +1 -0
  240. package/es/common/clone.js +6 -0
  241. package/es/common/clone.js.map +1 -1
  242. package/es/common/cloneDeep.js +4 -1
  243. package/es/common/cloneDeep.js.map +1 -1
  244. package/es/common/correlation.d.ts +3 -0
  245. package/es/common/correlation.js +77 -0
  246. package/es/common/correlation.js.map +1 -0
  247. package/es/common/debounce.js +22 -4
  248. package/es/common/debounce.js.map +1 -1
  249. package/es/common/ecdf.d.ts +8 -0
  250. package/es/common/ecdf.js +11 -1
  251. package/es/common/ecdf.js.map +1 -1
  252. package/es/common/extent.d.ts +4 -0
  253. package/es/common/extent.js +8 -3
  254. package/es/common/extent.js.map +1 -1
  255. package/es/common/field.d.ts +6 -0
  256. package/es/common/field.js +3 -1
  257. package/es/common/field.js.map +1 -1
  258. package/es/common/getType.js +1 -2
  259. package/es/common/has.d.ts +17 -0
  260. package/es/common/has.js +18 -1
  261. package/es/common/has.js.map +1 -1
  262. package/es/common/index.d.ts +4 -0
  263. package/es/common/index.js +22 -0
  264. package/es/common/index.js.map +1 -1
  265. package/es/common/interpolate.js +16 -3
  266. package/es/common/interpolate.js.map +1 -1
  267. package/es/common/isBase64.d.ts +6 -0
  268. package/es/common/isBase64.js +6 -0
  269. package/es/common/isBase64.js.map +1 -1
  270. package/es/common/isBoolean.d.ts +13 -0
  271. package/es/common/isBoolean.js +13 -1
  272. package/es/common/isBoolean.js.map +1 -1
  273. package/es/common/isEmpty.js +11 -1
  274. package/es/common/isEmpty.js.map +1 -1
  275. package/es/common/isEqual.js +19 -7
  276. package/es/common/isEqual.js.map +1 -1
  277. package/es/common/isFunction.d.ts +25 -0
  278. package/es/common/isFunction.js +26 -0
  279. package/es/common/isFunction.js.map +1 -1
  280. package/es/common/isNull.js +2 -1
  281. package/es/common/isNumber.d.ts +23 -0
  282. package/es/common/isNumber.js +23 -1
  283. package/es/common/isNumber.js.map +1 -1
  284. package/es/common/isNumeric.d.ts +25 -0
  285. package/es/common/isNumeric.js +25 -0
  286. package/es/common/isNumeric.js.map +1 -1
  287. package/es/common/isObject.d.ts +21 -0
  288. package/es/common/isObject.js +23 -2
  289. package/es/common/isObject.js.map +1 -1
  290. package/es/common/isObjectLike.d.ts +20 -0
  291. package/es/common/isObjectLike.js +21 -0
  292. package/es/common/isObjectLike.js.map +1 -1
  293. package/es/common/isPlainObject.d.ts +25 -0
  294. package/es/common/isPlainObject.js +26 -0
  295. package/es/common/isPlainObject.js.map +1 -1
  296. package/es/common/isShallowEqual.js +2 -1
  297. package/es/common/isShallowEqual.js.map +1 -1
  298. package/es/common/isString.d.ts +13 -0
  299. package/es/common/isString.js +14 -2
  300. package/es/common/isString.js.map +1 -1
  301. package/es/common/isType.d.ts +6 -0
  302. package/es/common/isType.js +7 -1
  303. package/es/common/isType.js.map +1 -1
  304. package/es/common/isValidNumber.js.map +1 -1
  305. package/es/common/isValidUrl.js.map +1 -1
  306. package/es/common/kde.d.ts +28 -0
  307. package/es/common/kde.js +29 -7
  308. package/es/common/kde.js.map +1 -1
  309. package/es/common/mean.d.ts +2 -0
  310. package/es/common/mean.js +19 -0
  311. package/es/common/mean.js.map +1 -0
  312. package/es/common/merge.js +22 -5
  313. package/es/common/merge.js.map +1 -1
  314. package/es/common/mixin.js +14 -3
  315. package/es/common/mixin.js.map +1 -1
  316. package/es/common/normalQuantile.d.ts +5 -0
  317. package/es/common/normalQuantile.js +15 -0
  318. package/es/common/normalQuantile.js.map +1 -0
  319. package/es/common/number.d.ts +24 -0
  320. package/es/common/number.js +24 -2
  321. package/es/common/number.js.map +1 -1
  322. package/es/common/pad.d.ts +21 -0
  323. package/es/common/pad.js +21 -1
  324. package/es/common/pad.js.map +1 -1
  325. package/es/common/random.d.ts +3 -0
  326. package/es/common/random.js +13 -1
  327. package/es/common/random.js.map +1 -1
  328. package/es/common/regression-linear.d.ts +4 -0
  329. package/es/common/regression-linear.js +18 -14
  330. package/es/common/regression-linear.js.map +1 -1
  331. package/es/common/regression-logistic.d.ts +6 -0
  332. package/es/common/regression-logistic.js +24 -16
  333. package/es/common/regression-logistic.js.map +1 -1
  334. package/es/common/regression-lowess.d.ts +9 -0
  335. package/es/common/regression-lowess.js +50 -24
  336. package/es/common/regression-lowess.js.map +1 -1
  337. package/es/common/regression-polynomial.js +25 -16
  338. package/es/common/regression-polynomial.js.map +1 -1
  339. package/es/common/regression-utils.d.ts +13 -1
  340. package/es/common/regression-utils.js +18 -9
  341. package/es/common/regression-utils.js.map +1 -1
  342. package/es/common/throttle.js +3 -0
  343. package/es/common/throttle.js.map +1 -1
  344. package/es/common/toDate.js +23 -3
  345. package/es/common/toDate.js.map +1 -1
  346. package/es/common/uuid.d.ts +7 -0
  347. package/es/common/uuid.js +15 -1
  348. package/es/common/uuid.js.map +1 -1
  349. package/es/data-structure/bounds.d.ts +101 -0
  350. package/es/data-structure/bounds.js +75 -9
  351. package/es/data-structure/bounds.js.map +1 -1
  352. package/es/data-structure/hashTable.d.ts +4 -0
  353. package/es/data-structure/hashTable.js +13 -3
  354. package/es/data-structure/hashTable.js.map +1 -1
  355. package/es/data-structure/index.js +3 -1
  356. package/es/data-structure/index.js.map +1 -1
  357. package/es/data-structure/matrix.d.ts +91 -0
  358. package/es/data-structure/matrix.js +53 -6
  359. package/es/data-structure/matrix.js.map +1 -1
  360. package/es/data-structure/point.d.ts +3 -0
  361. package/es/data-structure/point.js +6 -2
  362. package/es/data-structure/point.js.map +1 -1
  363. package/es/dom.d.ts +36 -0
  364. package/es/dom.js +43 -8
  365. package/es/dom.js.map +1 -1
  366. package/es/fmin/blas1.js +10 -0
  367. package/es/fmin/blas1.js.map +1 -1
  368. package/es/fmin/conjugate-gradient.js +18 -2
  369. package/es/fmin/conjugate-gradient.js.map +1 -1
  370. package/es/fmin/linesearch.js +15 -0
  371. package/es/fmin/linesearch.js.map +1 -1
  372. package/es/fmin/nelder-mead.d.ts +1 -0
  373. package/es/fmin/nelder-mead.js +29 -9
  374. package/es/fmin/nelder-mead.js.map +1 -1
  375. package/es/format/number/formatDecimal.js +9 -1
  376. package/es/format/number/formatDecimal.js.map +1 -1
  377. package/es/format/number/formatGroup.js +7 -0
  378. package/es/format/number/formatGroup.js.map +1 -1
  379. package/es/format/number/formatPrefixAuto.js +8 -0
  380. package/es/format/number/formatPrefixAuto.js.map +1 -1
  381. package/es/format/number/formatRounded.js +7 -0
  382. package/es/format/number/formatRounded.js.map +1 -1
  383. package/es/format/number/formatTrim.js +7 -0
  384. package/es/format/number/formatTrim.js.map +1 -1
  385. package/es/format/number/number.js +40 -8
  386. package/es/format/number/number.js.map +1 -1
  387. package/es/format/time.js +23 -5
  388. package/es/format/time.js.map +1 -1
  389. package/es/geo/circle-intersection.d.ts +12 -0
  390. package/es/geo/circle-intersection.js +54 -14
  391. package/es/geo/circle-intersection.js.map +1 -1
  392. package/es/geo/constant.js +8 -0
  393. package/es/geo/constant.js.map +1 -1
  394. package/es/geo/invariant.d.ts +22 -0
  395. package/es/geo/invariant.js +24 -0
  396. package/es/geo/invariant.js.map +1 -1
  397. package/es/graphics/algorithm/aabb.js +7 -3
  398. package/es/graphics/algorithm/aabb.js.map +1 -1
  399. package/es/graphics/algorithm/intersect.d.ts +48 -0
  400. package/es/graphics/algorithm/intersect.js +75 -12
  401. package/es/graphics/algorithm/intersect.js.map +1 -1
  402. package/es/graphics/bounds-util.js +4 -2
  403. package/es/graphics/bounds-util.js.map +1 -1
  404. package/es/graphics/graph-util.js +4 -0
  405. package/es/graphics/graph-util.js.map +1 -1
  406. package/es/graphics/index.js +2 -0
  407. package/es/graphics/index.js.map +1 -1
  408. package/es/graphics/polygon.d.ts +12 -0
  409. package/es/graphics/polygon.js +28 -6
  410. package/es/graphics/polygon.js.map +1 -1
  411. package/es/graphics/text/measure/interface.d.ts +12 -0
  412. package/es/graphics/text/measure/textMeasure.d.ts +23 -0
  413. package/es/graphics/text/measure/textMeasure.js +46 -21
  414. package/es/graphics/text/measure/textMeasure.js.map +1 -1
  415. package/es/graphics/text/measure/util.js +1 -0
  416. package/es/graphics/text/measure/util.js.map +1 -1
  417. package/es/graphics/text/stringWidth.js +7 -3
  418. package/es/graphics/text/stringWidth.js.map +1 -1
  419. package/es/index.d.ts +6 -0
  420. package/es/index.js +15 -1
  421. package/es/index.js.map +1 -1
  422. package/es/logger.js +12 -1
  423. package/es/logger.js.map +1 -1
  424. package/es/lru.js +14 -6
  425. package/es/lru.js.map +1 -1
  426. package/es/math.d.ts +9 -0
  427. package/es/math.js +10 -1
  428. package/es/math.js.map +1 -1
  429. package/es/padding.d.ts +5 -0
  430. package/es/padding.js +5 -1
  431. package/es/padding.js.map +1 -1
  432. package/es/time/formatUtils.d.ts +6 -0
  433. package/es/time/formatUtils.js +7 -1
  434. package/es/time/formatUtils.js.map +1 -1
  435. package/package.json +3 -3
@@ -13,5 +13,17 @@ Object.defineProperty(exports, "__esModule", {
13
13
  const isType_1 = __importDefault(require("./isType")), isBoolean = (value, fuzzy = !1) => fuzzy ? "boolean" == typeof value : !0 === value || !1 === value || (0,
14
14
  isType_1.default)(value, "Boolean");
15
15
 
16
- exports.default = isBoolean;
16
+ /**
17
+ * Checks if `value` is classified as a boolean primitive or object.
18
+ * @param {*} value The value to check.
19
+ * @param {boolean} fuzzy Whether to perform fuzzy judgment, for better performance,default to `false`.
20
+ * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
21
+ * @example
22
+ *
23
+ * isBoolean(false)
24
+ * // => true
25
+ *
26
+ * isBoolean(null)
27
+ * // => false
28
+ */ exports.default = isBoolean;
17
29
  //# sourceMappingURL=isBoolean.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/common/isBoolean.ts"],"names":[],"mappings":";;;;;AAAA,sDAA8B;AAe9B,MAAM,SAAS,GAAG,CAAC,KAAU,EAAE,QAAiB,KAAK,EAAoB,EAAE;IACzE,IAAI,KAAK,EAAE;QACT,OAAO,OAAO,KAAK,KAAK,SAAS,CAAC;KACnC;IACD,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,IAAI,IAAA,gBAAM,EAAC,KAAK,EAAE,SAAS,CAAC,CAAC;AACvE,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","file":"isBoolean.js","sourcesContent":["import isType from './isType';\n\n/**\n * Checks if `value` is classified as a boolean primitive or object.\n * @param {*} value The value to check.\n * @param {boolean} fuzzy Whether to perform fuzzy judgment, for better performance,default to `false`.\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n * @example\n *\n * isBoolean(false)\n * // => true\n *\n * isBoolean(null)\n * // => false\n */\nconst isBoolean = (value: any, fuzzy: boolean = false): value is boolean => {\n if (fuzzy) {\n return typeof value === 'boolean';\n }\n return value === true || value === false || isType(value, 'Boolean');\n};\n\nexport default isBoolean;\n"]}
1
+ {"version":3,"sources":["../src/common/isBoolean.ts"],"names":[],"mappings":";;;;;AAAA,sDAA8B;AAE9B;;;;;;;;;;;;GAYG;AACH,MAAM,SAAS,GAAG,CAAC,KAAU,EAAE,QAAiB,KAAK,EAAoB,EAAE;IACzE,IAAI,KAAK,EAAE;QACT,OAAO,OAAO,KAAK,KAAK,SAAS,CAAC;KACnC;IACD,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,IAAI,IAAA,gBAAM,EAAC,KAAK,EAAE,SAAS,CAAC,CAAC;AACvE,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","file":"isBoolean.js","sourcesContent":["import isType from './isType';\n\n/**\n * Checks if `value` is classified as a boolean primitive or object.\n * @param {*} value The value to check.\n * @param {boolean} fuzzy Whether to perform fuzzy judgment, for better performance,default to `false`.\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n * @example\n *\n * isBoolean(false)\n * // => true\n *\n * isBoolean(null)\n * // => false\n */\nconst isBoolean = (value: any, fuzzy: boolean = false): value is boolean => {\n if (fuzzy) {\n return typeof value === 'boolean';\n }\n return value === true || value === false || isType(value, 'Boolean');\n};\n\nexport default isBoolean;\n"]}
@@ -13,9 +13,19 @@ Object.defineProperty(exports, "__esModule", {
13
13
  const isNil_1 = __importDefault(require("./isNil")), isArrayLike_1 = __importDefault(require("./isArrayLike")), getType_1 = __importDefault(require("./getType")), isPrototype_1 = __importDefault(require("./isPrototype")), hasOwnProperty = Object.prototype.hasOwnProperty;
14
14
 
15
15
  function isEmpty(value) {
16
+ /**
17
+ * isEmpty(null) => true
18
+ * isEmpty() => true
19
+ * isEmpty(true) => true
20
+ * isEmpty(1) => true
21
+ * isEmpty([1, 2, 3]) => false
22
+ * isEmpty('abc') => false
23
+ * isEmpty({ a: 1 }) => false
24
+ */
16
25
  if ((0, isNil_1.default)(value)) return !0;
17
26
  if ((0, isArrayLike_1.default)(value)) return !value.length;
18
- const type = (0, getType_1.default)(value);
27
+ // TODO: 这里需要优化下
28
+ const type = (0, getType_1.default)(value);
19
29
  if ("Map" === type || "Set" === type) return !value.size;
20
30
  if ((0, isPrototype_1.default)(value)) return !Object.keys(value).length;
21
31
  for (const key in value) if (hasOwnProperty.call(value, key)) return !1;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/common/isEmpty.ts"],"names":[],"mappings":";;;;;AAAA,oDAA4B;AAC5B,gEAAwC;AACxC,wDAAgC;AAChC,gEAAwC;AAExC,MAAM,cAAc,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AAEvD,SAAS,OAAO,CAAC,KAAU;IAUzB,IAAI,IAAA,eAAK,EAAC,KAAK,CAAC,EAAE;QAChB,OAAO,IAAI,CAAC;KACb;IACD,IAAI,IAAA,qBAAW,EAAC,KAAK,CAAC,EAAE;QACtB,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC;KACtB;IAED,MAAM,IAAI,GAAG,IAAA,iBAAO,EAAC,KAAK,CAAC,CAAC;IAC5B,IAAI,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,EAAE;QACpC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC;KACpB;IACD,IAAI,IAAA,qBAAW,EAAC,KAAK,CAAC,EAAE;QACtB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC;KACnC;IACD,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE;QACvB,IAAI,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE;YACnC,OAAO,KAAK,CAAC;SACd;KACF;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,kBAAe,OAAO,CAAC","file":"isEmpty.js","sourcesContent":["import isNil from './isNil';\nimport isArrayLike from './isArrayLike';\nimport getType from './getType';\nimport isPrototype from './isPrototype';\n\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction isEmpty(value: any): boolean {\n /**\n * isEmpty(null) => true\n * isEmpty() => true\n * isEmpty(true) => true\n * isEmpty(1) => true\n * isEmpty([1, 2, 3]) => false\n * isEmpty('abc') => false\n * isEmpty({ a: 1 }) => false\n */\n if (isNil(value)) {\n return true;\n }\n if (isArrayLike(value)) {\n return !value.length;\n }\n // TODO: 这里需要优化下\n const type = getType(value);\n if (type === 'Map' || type === 'Set') {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !Object.keys(value).length;\n }\n for (const key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n}\n\nexport default isEmpty;\n"]}
1
+ {"version":3,"sources":["../src/common/isEmpty.ts"],"names":[],"mappings":";;;;;AAAA,oDAA4B;AAC5B,gEAAwC;AACxC,wDAAgC;AAChC,gEAAwC;AAExC,MAAM,cAAc,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AAEvD,SAAS,OAAO,CAAC,KAAU;IACzB;;;;;;;;OAQG;IACH,IAAI,IAAA,eAAK,EAAC,KAAK,CAAC,EAAE;QAChB,OAAO,IAAI,CAAC;KACb;IACD,IAAI,IAAA,qBAAW,EAAC,KAAK,CAAC,EAAE;QACtB,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC;KACtB;IACD,gBAAgB;IAChB,MAAM,IAAI,GAAG,IAAA,iBAAO,EAAC,KAAK,CAAC,CAAC;IAC5B,IAAI,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,EAAE;QACpC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC;KACpB;IACD,IAAI,IAAA,qBAAW,EAAC,KAAK,CAAC,EAAE;QACtB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC;KACnC;IACD,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE;QACvB,IAAI,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE;YACnC,OAAO,KAAK,CAAC;SACd;KACF;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,kBAAe,OAAO,CAAC","file":"isEmpty.js","sourcesContent":["import isNil from './isNil';\nimport isArrayLike from './isArrayLike';\nimport getType from './getType';\nimport isPrototype from './isPrototype';\n\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction isEmpty(value: any): boolean {\n /**\n * isEmpty(null) => true\n * isEmpty() => true\n * isEmpty(true) => true\n * isEmpty(1) => true\n * isEmpty([1, 2, 3]) => false\n * isEmpty('abc') => false\n * isEmpty({ a: 1 }) => false\n */\n if (isNil(value)) {\n return true;\n }\n if (isArrayLike(value)) {\n return !value.length;\n }\n // TODO: 这里需要优化下\n const type = getType(value);\n if (type === 'Map' || type === 'Set') {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !Object.keys(value).length;\n }\n for (const key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n}\n\nexport default isEmpty;\n"]}
@@ -20,14 +20,20 @@ function objectKeys(obj) {
20
20
  return Object.keys(obj);
21
21
  }
22
22
 
23
+ // Adapted from https://github.com/antvis/F2/blob/master/packages/f2/src/base/equal.ts by zengyue
24
+ // License: https://github.com/antvis/F2/blob/master/packages/f2/LICENSE
23
25
  function isEqual(a, b, options) {
24
26
  if (a === b) return !0;
25
27
  if (typeof a != typeof b) return !1;
26
- if (null == a || null == b) return !1;
27
- if (Number.isNaN(a) && Number.isNaN(b)) return !0;
28
+ // null 和 undefined
29
+ if (null == a || null == b) return !1;
30
+ // 特殊处理NaN
31
+ if (Number.isNaN(a) && Number.isNaN(b)) return !0;
28
32
  if (objToString(a) !== objToString(b)) return !1;
29
- if ((0, isFunction_1.default)(a)) return !!(null == options ? void 0 : options.skipFunction);
30
- if ("object" != typeof a) return !1;
33
+ // 如果是function,则不相等
34
+ if ((0, isFunction_1.default)(a)) return !!(null == options ? void 0 : options.skipFunction);
35
+ // 值类型,Number String Boolean
36
+ if ("object" != typeof a) return !1;
31
37
  if ((0, isArray_1.default)(a)) {
32
38
  if (a.length !== b.length) return !1;
33
39
  for (let i = a.length - 1; i >= 0; i--) if (!isEqual(a[i], b[i], options)) return !1;
@@ -35,10 +41,16 @@ function isEqual(a, b, options) {
35
41
  }
36
42
  if (!(0, isPlainObject_1.default)(a)) return !1;
37
43
  const ka = objectKeys(a), kb = objectKeys(b);
44
+ // having the same number of owned properties (keys incorporates hasOwnProperty)
38
45
  if (ka.length !== kb.length) return !1;
39
- ka.sort(), kb.sort();
40
- for (let i = ka.length - 1; i >= 0; i--) if (ka[i] != kb[i]) return !1;
41
- for (let i = ka.length - 1; i >= 0; i--) {
46
+ // the same set of keys (although not necessarily the same order),
47
+ ka.sort(), kb.sort();
48
+ // ~~~cheap key test
49
+ for (let i = ka.length - 1; i >= 0; i--)
50
+ // eslint-disable-next-line eqeqeq
51
+ if (ka[i] != kb[i]) return !1;
52
+ // equivalent values for every corresponding key, and ~~~possibly expensive deep test
53
+ for (let i = ka.length - 1; i >= 0; i--) {
42
54
  const key = ka[i];
43
55
  if (!isEqual(a[key], b[key], options)) return !1;
44
56
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/common/isEqual.ts"],"names":[],"mappings":";;;;;;AAAA,wDAAgC;AAChC,8DAAsC;AACtC,oEAA4C;AAE5C,SAAS,WAAW,CAAC,GAAQ;IAC3B,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7C,CAAC;AAED,SAAS,UAAU,CAAC,GAAQ;IAC1B,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC1B,CAAC;AAID,SAAgB,OAAO,CAAC,CAAM,EAAE,CAAM,EAAE,OAAoC;IAC1E,IAAI,CAAC,KAAK,CAAC,EAAE;QACX,OAAO,IAAI,CAAC;KACb;IAED,IAAI,OAAO,CAAC,KAAK,OAAO,CAAC,EAAE;QACzB,OAAO,KAAK,CAAC;KACd;IAGD,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,IAAI,EAAE;QAC1B,OAAO,KAAK,CAAC;KACd;IAGD,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;QACtC,OAAO,IAAI,CAAC;KACb;IAED,IAAI,WAAW,CAAC,CAAC,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC,EAAE;QACrC,OAAO,KAAK,CAAC;KACd;IAGD,IAAI,IAAA,oBAAU,EAAC,CAAC,CAAC,EAAE;QACjB,OAAO,CAAC,CAAC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,YAAY,CAAA,CAAC;KAChC;IAGD,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE;QACzB,OAAO,KAAK,CAAC;KACd;IAED,IAAI,IAAA,iBAAO,EAAC,CAAC,CAAC,EAAE;QACd,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,EAAE;YACzB,OAAO,KAAK,CAAC;SACd;QACD,KAAK,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;YACtC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE;gBACjC,OAAO,KAAK,CAAC;aACd;SACF;QACD,OAAO,IAAI,CAAC;KACb;IAED,IAAI,CAAC,IAAA,uBAAa,EAAC,CAAC,CAAC,EAAE;QACrB,OAAO,KAAK,CAAC;KACd;IAED,MAAM,EAAE,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;IACzB,MAAM,EAAE,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;IAEzB,IAAI,EAAE,CAAC,MAAM,KAAK,EAAE,CAAC,MAAM,EAAE;QAC3B,OAAO,KAAK,CAAC;KACd;IAGD,EAAE,CAAC,IAAI,EAAE,CAAC;IACV,EAAE,CAAC,IAAI,EAAE,CAAC;IAEV,KAAK,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;QAEvC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE;YAClB,OAAO,KAAK,CAAC;SACd;KACF;IAGD,KAAK,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;QACvC,MAAM,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;QAClB,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,EAAE;YACrC,OAAO,KAAK,CAAC;SACd;KACF;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AA5ED,0BA4EC","file":"isEqual.js","sourcesContent":["import isArray from './isArray';\nimport isFunction from './isFunction';\nimport isPlainObject from './isPlainObject';\n\nfunction objToString(obj: any) {\n return Object.prototype.toString.call(obj);\n}\n\nfunction objectKeys(obj: any) {\n return Object.keys(obj);\n}\n\n// Adapted from https://github.com/antvis/F2/blob/master/packages/f2/src/base/equal.ts by zengyue\n// License: https://github.com/antvis/F2/blob/master/packages/f2/LICENSE\nexport function isEqual(a: any, b: any, options?: { skipFunction?: boolean }): boolean {\n if (a === b) {\n return true;\n }\n\n if (typeof a !== typeof b) {\n return false;\n }\n\n // null 和 undefined\n if (a == null || b == null) {\n return false;\n }\n\n // 特殊处理NaN\n if (Number.isNaN(a) && Number.isNaN(b)) {\n return true;\n }\n\n if (objToString(a) !== objToString(b)) {\n return false;\n }\n\n // 如果是function,则不相等\n if (isFunction(a)) {\n return !!options?.skipFunction;\n }\n\n // 值类型,Number String Boolean\n if (typeof a !== 'object') {\n return false;\n }\n\n if (isArray(a)) {\n if (a.length !== b.length) {\n return false;\n }\n for (let i = a.length - 1; i >= 0; i--) {\n if (!isEqual(a[i], b[i], options)) {\n return false;\n }\n }\n return true;\n }\n\n if (!isPlainObject(a)) {\n return false;\n }\n\n const ka = objectKeys(a);\n const kb = objectKeys(b);\n // having the same number of owned properties (keys incorporates hasOwnProperty)\n if (ka.length !== kb.length) {\n return false;\n }\n\n // the same set of keys (although not necessarily the same order),\n ka.sort();\n kb.sort();\n // ~~~cheap key test\n for (let i = ka.length - 1; i >= 0; i--) {\n // eslint-disable-next-line eqeqeq\n if (ka[i] != kb[i]) {\n return false;\n }\n }\n\n // equivalent values for every corresponding key, and ~~~possibly expensive deep test\n for (let i = ka.length - 1; i >= 0; i--) {\n const key = ka[i];\n if (!isEqual(a[key], b[key], options)) {\n return false;\n }\n }\n\n return true;\n}\n"]}
1
+ {"version":3,"sources":["../src/common/isEqual.ts"],"names":[],"mappings":";;;;;;AAAA,wDAAgC;AAChC,8DAAsC;AACtC,oEAA4C;AAE5C,SAAS,WAAW,CAAC,GAAQ;IAC3B,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7C,CAAC;AAED,SAAS,UAAU,CAAC,GAAQ;IAC1B,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC1B,CAAC;AAED,iGAAiG;AACjG,wEAAwE;AACxE,SAAgB,OAAO,CAAC,CAAM,EAAE,CAAM,EAAE,OAAoC;IAC1E,IAAI,CAAC,KAAK,CAAC,EAAE;QACX,OAAO,IAAI,CAAC;KACb;IAED,IAAI,OAAO,CAAC,KAAK,OAAO,CAAC,EAAE;QACzB,OAAO,KAAK,CAAC;KACd;IAED,mBAAmB;IACnB,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,IAAI,EAAE;QAC1B,OAAO,KAAK,CAAC;KACd;IAED,UAAU;IACV,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;QACtC,OAAO,IAAI,CAAC;KACb;IAED,IAAI,WAAW,CAAC,CAAC,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC,EAAE;QACrC,OAAO,KAAK,CAAC;KACd;IAED,mBAAmB;IACnB,IAAI,IAAA,oBAAU,EAAC,CAAC,CAAC,EAAE;QACjB,OAAO,CAAC,CAAC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,YAAY,CAAA,CAAC;KAChC;IAED,4BAA4B;IAC5B,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE;QACzB,OAAO,KAAK,CAAC;KACd;IAED,IAAI,IAAA,iBAAO,EAAC,CAAC,CAAC,EAAE;QACd,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,EAAE;YACzB,OAAO,KAAK,CAAC;SACd;QACD,KAAK,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;YACtC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE;gBACjC,OAAO,KAAK,CAAC;aACd;SACF;QACD,OAAO,IAAI,CAAC;KACb;IAED,IAAI,CAAC,IAAA,uBAAa,EAAC,CAAC,CAAC,EAAE;QACrB,OAAO,KAAK,CAAC;KACd;IAED,MAAM,EAAE,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;IACzB,MAAM,EAAE,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;IACzB,gFAAgF;IAChF,IAAI,EAAE,CAAC,MAAM,KAAK,EAAE,CAAC,MAAM,EAAE;QAC3B,OAAO,KAAK,CAAC;KACd;IAED,kEAAkE;IAClE,EAAE,CAAC,IAAI,EAAE,CAAC;IACV,EAAE,CAAC,IAAI,EAAE,CAAC;IACV,oBAAoB;IACpB,KAAK,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;QACvC,kCAAkC;QAClC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE;YAClB,OAAO,KAAK,CAAC;SACd;KACF;IAED,qFAAqF;IACrF,KAAK,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;QACvC,MAAM,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;QAClB,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,EAAE;YACrC,OAAO,KAAK,CAAC;SACd;KACF;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AA5ED,0BA4EC","file":"isEqual.js","sourcesContent":["import isArray from './isArray';\nimport isFunction from './isFunction';\nimport isPlainObject from './isPlainObject';\n\nfunction objToString(obj: any) {\n return Object.prototype.toString.call(obj);\n}\n\nfunction objectKeys(obj: any) {\n return Object.keys(obj);\n}\n\n// Adapted from https://github.com/antvis/F2/blob/master/packages/f2/src/base/equal.ts by zengyue\n// License: https://github.com/antvis/F2/blob/master/packages/f2/LICENSE\nexport function isEqual(a: any, b: any, options?: { skipFunction?: boolean }): boolean {\n if (a === b) {\n return true;\n }\n\n if (typeof a !== typeof b) {\n return false;\n }\n\n // null 和 undefined\n if (a == null || b == null) {\n return false;\n }\n\n // 特殊处理NaN\n if (Number.isNaN(a) && Number.isNaN(b)) {\n return true;\n }\n\n if (objToString(a) !== objToString(b)) {\n return false;\n }\n\n // 如果是function,则不相等\n if (isFunction(a)) {\n return !!options?.skipFunction;\n }\n\n // 值类型,Number String Boolean\n if (typeof a !== 'object') {\n return false;\n }\n\n if (isArray(a)) {\n if (a.length !== b.length) {\n return false;\n }\n for (let i = a.length - 1; i >= 0; i--) {\n if (!isEqual(a[i], b[i], options)) {\n return false;\n }\n }\n return true;\n }\n\n if (!isPlainObject(a)) {\n return false;\n }\n\n const ka = objectKeys(a);\n const kb = objectKeys(b);\n // having the same number of owned properties (keys incorporates hasOwnProperty)\n if (ka.length !== kb.length) {\n return false;\n }\n\n // the same set of keys (although not necessarily the same order),\n ka.sort();\n kb.sort();\n // ~~~cheap key test\n for (let i = ka.length - 1; i >= 0; i--) {\n // eslint-disable-next-line eqeqeq\n if (ka[i] != kb[i]) {\n return false;\n }\n }\n\n // equivalent values for every corresponding key, and ~~~possibly expensive deep test\n for (let i = ka.length - 1; i >= 0; i--) {\n const key = ka[i];\n if (!isEqual(a[key], b[key], options)) {\n return false;\n }\n }\n\n return true;\n}\n"]}
@@ -1,2 +1,27 @@
1
+ /**
2
+ * Checks if `value` is classified as a `Function` object.
3
+ *
4
+ * @param {*} value The value to check.
5
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
6
+ * @example
7
+ *
8
+ * isFunction(class Any{})
9
+ * // => true
10
+ *
11
+ * isFunction(() => {})
12
+ * // => true
13
+ *
14
+ * isFunction(async () => {})
15
+ * // => true
16
+ *
17
+ * isFunction(function * Any() {})
18
+ * // => true
19
+ *
20
+ * isFunction(Math.round)
21
+ * // => true
22
+ *
23
+ * isFunction(/abc/)
24
+ * // => false
25
+ */
1
26
  declare const isFunction: (value: any) => value is Function;
2
27
  export default isFunction;
@@ -4,6 +4,32 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  });
6
6
 
7
+ /**
8
+ * Checks if `value` is classified as a `Function` object.
9
+ *
10
+ * @param {*} value The value to check.
11
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
12
+ * @example
13
+ *
14
+ * isFunction(class Any{})
15
+ * // => true
16
+ *
17
+ * isFunction(() => {})
18
+ * // => true
19
+ *
20
+ * isFunction(async () => {})
21
+ * // => true
22
+ *
23
+ * isFunction(function * Any() {})
24
+ * // => true
25
+ *
26
+ * isFunction(Math.round)
27
+ * // => true
28
+ *
29
+ * isFunction(/abc/)
30
+ * // => false
31
+ */
32
+ // eslint-disable-next-line @typescript-eslint/ban-types
7
33
  const isFunction = value => "function" == typeof value;
8
34
 
9
35
  exports.default = isFunction;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/common/isFunction.ts"],"names":[],"mappings":";;AA0BA,MAAM,UAAU,GAAG,CAAC,KAAU,EAAqB,EAAE;IACnD,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC;AACrC,CAAC,CAAC;AAEF,kBAAe,UAAU,CAAC","file":"isFunction.js","sourcesContent":["/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * isFunction(class Any{})\n * // => true\n *\n * isFunction(() => {})\n * // => true\n *\n * isFunction(async () => {})\n * // => true\n *\n * isFunction(function * Any() {})\n * // => true\n *\n * isFunction(Math.round)\n * // => true\n *\n * isFunction(/abc/)\n * // => false\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nconst isFunction = (value: any): value is Function => {\n return typeof value === 'function';\n};\n\nexport default isFunction;\n"]}
1
+ {"version":3,"sources":["../src/common/isFunction.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wDAAwD;AACxD,MAAM,UAAU,GAAG,CAAC,KAAU,EAAqB,EAAE;IACnD,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC;AACrC,CAAC,CAAC;AAEF,kBAAe,UAAU,CAAC","file":"isFunction.js","sourcesContent":["/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * isFunction(class Any{})\n * // => true\n *\n * isFunction(() => {})\n * // => true\n *\n * isFunction(async () => {})\n * // => true\n *\n * isFunction(function * Any() {})\n * // => true\n *\n * isFunction(Math.round)\n * // => true\n *\n * isFunction(/abc/)\n * // => false\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nconst isFunction = (value: any): value is Function => {\n return typeof value === 'function';\n};\n\nexport default isFunction;\n"]}
@@ -6,4 +6,5 @@ Object.defineProperty(exports, "__esModule", {
6
6
 
7
7
  const isNull = value => null === value;
8
8
 
9
- exports.default = isNull;
9
+ exports.default = isNull;
10
+ //# sourceMappingURL=isNull.js.map
@@ -1,2 +1,25 @@
1
+ /**
2
+ * Checks if `value` is classified as a `Number` primitive or object.
3
+ *
4
+ * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
5
+ * classified as numbers, use the `Number.isFinite` method.
6
+ *
7
+ * @param {*} value The value to check.
8
+ * @param {boolean} fuzzy Whether to perform fuzzy judgment, for better performance,default to `false`.
9
+ * @returns {boolean} Returns `true` if `value` is a number, else `false`.
10
+ * @example
11
+ *
12
+ * isNumber(3)
13
+ * // => true
14
+ *
15
+ * isNumber(Number.MIN_VALUE)
16
+ * // => true
17
+ *
18
+ * isNumber(Infinity)
19
+ * // => true
20
+ *
21
+ * isNumber('3')
22
+ * // => false
23
+ */
1
24
  declare const isNumber: (value: any, fuzzy?: boolean) => value is number;
2
25
  export default isNumber;
@@ -15,5 +15,27 @@ const isType_1 = __importDefault(require("./isType")), isNumber = (value, fuzzy
15
15
  return fuzzy ? "number" === type : "number" === type || (0, isType_1.default)(value, "Number");
16
16
  };
17
17
 
18
- exports.default = isNumber;
18
+ /**
19
+ * Checks if `value` is classified as a `Number` primitive or object.
20
+ *
21
+ * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
22
+ * classified as numbers, use the `Number.isFinite` method.
23
+ *
24
+ * @param {*} value The value to check.
25
+ * @param {boolean} fuzzy Whether to perform fuzzy judgment, for better performance,default to `false`.
26
+ * @returns {boolean} Returns `true` if `value` is a number, else `false`.
27
+ * @example
28
+ *
29
+ * isNumber(3)
30
+ * // => true
31
+ *
32
+ * isNumber(Number.MIN_VALUE)
33
+ * // => true
34
+ *
35
+ * isNumber(Infinity)
36
+ * // => true
37
+ *
38
+ * isNumber('3')
39
+ * // => false
40
+ */ exports.default = isNumber;
19
41
  //# sourceMappingURL=isNumber.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/common/isNumber.ts"],"names":[],"mappings":";;;;;AAAA,sDAA8B;AAyB9B,MAAM,QAAQ,GAAG,CAAC,KAAU,EAAE,QAAiB,KAAK,EAAmB,EAAE;IACvE,MAAM,IAAI,GAAG,OAAO,KAAK,CAAC;IAC1B,IAAI,KAAK,EAAE;QACT,OAAO,IAAI,KAAK,QAAQ,CAAC;KAC1B;IACD,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAA,gBAAM,EAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;AACtD,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC","file":"isNumber.js","sourcesContent":["import isType from './isType';\n\n/**\n * Checks if `value` is classified as a `Number` primitive or object.\n *\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n * classified as numbers, use the `Number.isFinite` method.\n *\n * @param {*} value The value to check.\n * @param {boolean} fuzzy Whether to perform fuzzy judgment, for better performance,default to `false`.\n * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n * @example\n *\n * isNumber(3)\n * // => true\n *\n * isNumber(Number.MIN_VALUE)\n * // => true\n *\n * isNumber(Infinity)\n * // => true\n *\n * isNumber('3')\n * // => false\n */\nconst isNumber = (value: any, fuzzy: boolean = false): value is number => {\n const type = typeof value;\n if (fuzzy) {\n return type === 'number';\n }\n return type === 'number' || isType(value, 'Number');\n};\n\nexport default isNumber;\n"]}
1
+ {"version":3,"sources":["../src/common/isNumber.ts"],"names":[],"mappings":";;;;;AAAA,sDAA8B;AAE9B;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,QAAQ,GAAG,CAAC,KAAU,EAAE,QAAiB,KAAK,EAAmB,EAAE;IACvE,MAAM,IAAI,GAAG,OAAO,KAAK,CAAC;IAC1B,IAAI,KAAK,EAAE;QACT,OAAO,IAAI,KAAK,QAAQ,CAAC;KAC1B;IACD,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAA,gBAAM,EAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;AACtD,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC","file":"isNumber.js","sourcesContent":["import isType from './isType';\n\n/**\n * Checks if `value` is classified as a `Number` primitive or object.\n *\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n * classified as numbers, use the `Number.isFinite` method.\n *\n * @param {*} value The value to check.\n * @param {boolean} fuzzy Whether to perform fuzzy judgment, for better performance,default to `false`.\n * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n * @example\n *\n * isNumber(3)\n * // => true\n *\n * isNumber(Number.MIN_VALUE)\n * // => true\n *\n * isNumber(Infinity)\n * // => true\n *\n * isNumber('3')\n * // => false\n */\nconst isNumber = (value: any, fuzzy: boolean = false): value is number => {\n const type = typeof value;\n if (fuzzy) {\n return type === 'number';\n }\n return type === 'number' || isType(value, 'Number');\n};\n\nexport default isNumber;\n"]}
@@ -1,2 +1,27 @@
1
+ /**
2
+ * Checks if `value` is classified as a legal string number
3
+ *
4
+ * @param {*} value The string value to check.
5
+ * @returns {boolean} Returns `true` if `value` is a legal string number, else `false`.
6
+ * @example
7
+ *
8
+ * isNumeric(1)
9
+ * // => false
10
+ *
11
+ * isNumeric('2.0')
12
+ * // => true
13
+ *
14
+ * isNumeric('3a')
15
+ * // => false
16
+ *
17
+ * isNumeric('4.a')
18
+ * // => false
19
+ *
20
+ * isNumeric(Infinity)
21
+ * // => false
22
+ *
23
+ * isNumeric('01')
24
+ * // => true
25
+ */
1
26
  declare const isNumeric: (value: string) => boolean;
2
27
  export default isNumeric;
@@ -4,6 +4,31 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  });
6
6
 
7
+ /**
8
+ * Checks if `value` is classified as a legal string number
9
+ *
10
+ * @param {*} value The string value to check.
11
+ * @returns {boolean} Returns `true` if `value` is a legal string number, else `false`.
12
+ * @example
13
+ *
14
+ * isNumeric(1)
15
+ * // => false
16
+ *
17
+ * isNumeric('2.0')
18
+ * // => true
19
+ *
20
+ * isNumeric('3a')
21
+ * // => false
22
+ *
23
+ * isNumeric('4.a')
24
+ * // => false
25
+ *
26
+ * isNumeric(Infinity)
27
+ * // => false
28
+ *
29
+ * isNumeric('01')
30
+ * // => true
31
+ */
7
32
  const isNumeric = value => "string" == typeof value && (!isNaN(Number(value)) && !isNaN(parseFloat(value)));
8
33
 
9
34
  exports.default = isNumeric;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/common/isNumeric.ts"],"names":[],"mappings":";;AAyBA,MAAM,SAAS,GAAG,CAAC,KAAa,EAAW,EAAE;IAC3C,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC7B,OAAO,KAAK,CAAC;KACd;IACD,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;AAC5D,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","file":"isNumeric.js","sourcesContent":["/**\n * Checks if `value` is classified as a legal string number\n *\n * @param {*} value The string value to check.\n * @returns {boolean} Returns `true` if `value` is a legal string number, else `false`.\n * @example\n *\n * isNumeric(1)\n * // => false\n *\n * isNumeric('2.0')\n * // => true\n *\n * isNumeric('3a')\n * // => false\n *\n * isNumeric('4.a')\n * // => false\n *\n * isNumeric(Infinity)\n * // => false\n *\n * isNumeric('01')\n * // => true\n */\nconst isNumeric = (value: string): boolean => {\n if (typeof value !== 'string') {\n return false;\n }\n return !isNaN(Number(value)) && !isNaN(parseFloat(value));\n};\n\nexport default isNumeric;\n"]}
1
+ {"version":3,"sources":["../src/common/isNumeric.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,SAAS,GAAG,CAAC,KAAa,EAAW,EAAE;IAC3C,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC7B,OAAO,KAAK,CAAC;KACd;IACD,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;AAC5D,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","file":"isNumeric.js","sourcesContent":["/**\n * Checks if `value` is classified as a legal string number\n *\n * @param {*} value The string value to check.\n * @returns {boolean} Returns `true` if `value` is a legal string number, else `false`.\n * @example\n *\n * isNumeric(1)\n * // => false\n *\n * isNumeric('2.0')\n * // => true\n *\n * isNumeric('3a')\n * // => false\n *\n * isNumeric('4.a')\n * // => false\n *\n * isNumeric(Infinity)\n * // => false\n *\n * isNumeric('01')\n * // => true\n */\nconst isNumeric = (value: string): boolean => {\n if (typeof value !== 'string') {\n return false;\n }\n return !isNaN(Number(value)) && !isNaN(parseFloat(value));\n};\n\nexport default isNumeric;\n"]}
@@ -1,2 +1,23 @@
1
+ /**
2
+ * Checks if `value` is the
3
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
4
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
5
+ *
6
+ * @param {*} value The value to check.
7
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
8
+ * @example
9
+ *
10
+ * isObject({})
11
+ * // => true
12
+ *
13
+ * isObject([1, 2, 3])
14
+ * // => true
15
+ *
16
+ * isObject(Function)
17
+ * // => true
18
+ *
19
+ * isObject(null)
20
+ * // => false
21
+ */
1
22
  declare const isObject: <T = object>(value: any) => value is T;
2
23
  export default isObject;
@@ -4,10 +4,31 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  });
6
6
 
7
+ /**
8
+ * Checks if `value` is the
9
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
10
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
11
+ *
12
+ * @param {*} value The value to check.
13
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
14
+ * @example
15
+ *
16
+ * isObject({})
17
+ * // => true
18
+ *
19
+ * isObject([1, 2, 3])
20
+ * // => true
21
+ *
22
+ * isObject(Function)
23
+ * // => true
24
+ *
25
+ * isObject(null)
26
+ * // => false
27
+ */
28
+ // eslint-disable-next-line @typescript-eslint/ban-types
7
29
  const isObject = value => {
8
30
  const type = typeof value;
9
31
  return null !== value && "object" === type || "function" === type;
10
32
  };
11
33
 
12
- exports.default = isObject;
13
- //# sourceMappingURL=isObject.js.map
34
+ exports.default = isObject;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/common/isObject.ts"],"names":[],"mappings":";;AAsBA,MAAM,QAAQ,GAAG,CAAa,KAAU,EAAc,EAAE;IACtD,MAAM,IAAI,GAAG,OAAO,KAAK,CAAC;IAC1B,OAAO,CAAC,KAAK,KAAK,IAAI,IAAI,IAAI,KAAK,QAAQ,CAAC,IAAI,IAAI,KAAK,UAAU,CAAC;AACtE,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC","file":"isObject.js","sourcesContent":["/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * isObject({})\n * // => true\n *\n * isObject([1, 2, 3])\n * // => true\n *\n * isObject(Function)\n * // => true\n *\n * isObject(null)\n * // => false\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nconst isObject = <T = object>(value: any): value is T => {\n const type = typeof value;\n return (value !== null && type === 'object') || type === 'function';\n};\n\nexport default isObject;\n"]}
1
+ {"version":3,"sources":["../src/common/isObject.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wDAAwD;AACxD,MAAM,QAAQ,GAAG,CAAa,KAAU,EAAc,EAAE;IACtD,MAAM,IAAI,GAAG,OAAO,KAAK,CAAC;IAC1B,OAAO,CAAC,KAAK,KAAK,IAAI,IAAI,IAAI,KAAK,QAAQ,CAAC,IAAI,IAAI,KAAK,UAAU,CAAC;AACtE,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC","file":"isObject.js","sourcesContent":["/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * isObject({})\n * // => true\n *\n * isObject([1, 2, 3])\n * // => true\n *\n * isObject(Function)\n * // => true\n *\n * isObject(null)\n * // => false\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nconst isObject = <T = object>(value: any): value is T => {\n const type = typeof value;\n return (value !== null && type === 'object') || type === 'function';\n};\n\nexport default isObject;\n"]}
@@ -1,2 +1,22 @@
1
+ /**
2
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
3
+ * and has a `typeof` result of "object".
4
+ *
5
+ * @param {*} value The value to check.
6
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
7
+ * @example
8
+ *
9
+ * isObjectLike({})
10
+ * // => true
11
+ *
12
+ * isObjectLike([1, 2, 3])
13
+ * // => true
14
+ *
15
+ * isObjectLike(Function)
16
+ * // => false
17
+ *
18
+ * isObjectLike(null)
19
+ * // => false
20
+ */
1
21
  declare const isObjectLike: (value: any) => value is object | Function | any[];
2
22
  export default isObjectLike;
@@ -4,6 +4,27 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  });
6
6
 
7
+ /**
8
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
9
+ * and has a `typeof` result of "object".
10
+ *
11
+ * @param {*} value The value to check.
12
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
13
+ * @example
14
+ *
15
+ * isObjectLike({})
16
+ * // => true
17
+ *
18
+ * isObjectLike([1, 2, 3])
19
+ * // => true
20
+ *
21
+ * isObjectLike(Function)
22
+ * // => false
23
+ *
24
+ * isObjectLike(null)
25
+ * // => false
26
+ */
27
+ // eslint-disable-next-line @typescript-eslint/ban-types
7
28
  const isObjectLike = value => "object" == typeof value && null !== value;
8
29
 
9
30
  exports.default = isObjectLike;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/common/isObjectLike.ts"],"names":[],"mappings":";;AAqBA,MAAM,YAAY,GAAG,CAAC,KAAU,EAA2C,EAAE;IAC3E,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,CAAC;AACrD,CAAC,CAAC;AAEF,kBAAe,YAAY,CAAC","file":"isObjectLike.js","sourcesContent":["/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * isObjectLike({})\n * // => true\n *\n * isObjectLike([1, 2, 3])\n * // => true\n *\n * isObjectLike(Function)\n * // => false\n *\n * isObjectLike(null)\n * // => false\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nconst isObjectLike = (value: any): value is object | Function | Array<any> => {\n return typeof value === 'object' && value !== null;\n};\n\nexport default isObjectLike;\n"]}
1
+ {"version":3,"sources":["../src/common/isObjectLike.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wDAAwD;AACxD,MAAM,YAAY,GAAG,CAAC,KAAU,EAA2C,EAAE;IAC3E,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,CAAC;AACrD,CAAC,CAAC;AAEF,kBAAe,YAAY,CAAC","file":"isObjectLike.js","sourcesContent":["/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * isObjectLike({})\n * // => true\n *\n * isObjectLike([1, 2, 3])\n * // => true\n *\n * isObjectLike(Function)\n * // => false\n *\n * isObjectLike(null)\n * // => false\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nconst isObjectLike = (value: any): value is object | Function | Array<any> => {\n return typeof value === 'object' && value !== null;\n};\n\nexport default isObjectLike;\n"]}
@@ -1,2 +1,27 @@
1
+ /**
2
+ * @see https://github.com/lodash/lodash/blob/master/isPlainObject.js
3
+ * Checks if `value` is a plain object, that is, an object created by the
4
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
5
+ *
6
+ * @param {*} value The value to check.
7
+ * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
8
+ * @example
9
+ *
10
+ * function Foo() {
11
+ * this.a = 1
12
+ * }
13
+ *
14
+ * isPlainObject(new Foo)
15
+ * // => false
16
+ *
17
+ * isPlainObject([1, 2, 3])
18
+ * // => false
19
+ *
20
+ * isPlainObject({ 'x': 0, 'y': 0 })
21
+ * // => true
22
+ *
23
+ * isPlainObject(Object.create(null))
24
+ * // => true
25
+ */
1
26
  declare const isPlainObject: (value: any) => value is object;
2
27
  export default isPlainObject;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/common/isPlainObject.ts"],"names":[],"mappings":";;;;;AAAA,kEAA0C;AAC1C,sDAA8B;AA4B9B,MAAM,aAAa,GAAG,UAAU,KAAU;IACxC,IAAI,CAAC,IAAA,sBAAY,EAAC,KAAK,CAAC,IAAI,CAAC,IAAA,gBAAM,EAAC,KAAK,EAAE,QAAQ,CAAC,EAAE;QACpD,OAAO,KAAK,CAAC;KACd;IACD,IAAI,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE;QACzC,OAAO,IAAI,CAAC;KACb;IACD,IAAI,KAAK,GAAG,KAAK,CAAC;IAClB,OAAO,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE;QAC5C,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;KACtC;IACD,OAAO,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC;AAChD,CAAC,CAAC;AAEF,kBAAe,aAAa,CAAC","file":"isPlainObject.js","sourcesContent":["import isObjectLike from './isObjectLike';\nimport isType from './isType';\n\n/**\n * @see https://github.com/lodash/lodash/blob/master/isPlainObject.js\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1\n * }\n *\n * isPlainObject(new Foo)\n * // => false\n *\n * isPlainObject([1, 2, 3])\n * // => false\n *\n * isPlainObject({ 'x': 0, 'y': 0 })\n * // => true\n *\n * isPlainObject(Object.create(null))\n * // => true\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nconst isPlainObject = function (value: any): value is object {\n if (!isObjectLike(value) || !isType(value, 'Object')) {\n return false;\n }\n if (Object.getPrototypeOf(value) === null) {\n return true;\n }\n let proto = value;\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(value) === proto;\n};\n\nexport default isPlainObject;\n"]}
1
+ {"version":3,"sources":["../src/common/isPlainObject.ts"],"names":[],"mappings":";;;;;AAAA,kEAA0C;AAC1C,sDAA8B;AAE9B;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wDAAwD;AACxD,MAAM,aAAa,GAAG,UAAU,KAAU;IACxC,IAAI,CAAC,IAAA,sBAAY,EAAC,KAAK,CAAC,IAAI,CAAC,IAAA,gBAAM,EAAC,KAAK,EAAE,QAAQ,CAAC,EAAE;QACpD,OAAO,KAAK,CAAC;KACd;IACD,IAAI,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE;QACzC,OAAO,IAAI,CAAC;KACb;IACD,IAAI,KAAK,GAAG,KAAK,CAAC;IAClB,OAAO,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE;QAC5C,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;KACtC;IACD,OAAO,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC;AAChD,CAAC,CAAC;AAEF,kBAAe,aAAa,CAAC","file":"isPlainObject.js","sourcesContent":["import isObjectLike from './isObjectLike';\nimport isType from './isType';\n\n/**\n * @see https://github.com/lodash/lodash/blob/master/isPlainObject.js\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1\n * }\n *\n * isPlainObject(new Foo)\n * // => false\n *\n * isPlainObject([1, 2, 3])\n * // => false\n *\n * isPlainObject({ 'x': 0, 'y': 0 })\n * // => true\n *\n * isPlainObject(Object.create(null))\n * // => true\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nconst isPlainObject = function (value: any): value is object {\n if (!isObjectLike(value) || !isType(value, 'Object')) {\n return false;\n }\n if (Object.getPrototypeOf(value) === null) {\n return true;\n }\n let proto = value;\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(value) === proto;\n};\n\nexport default isPlainObject;\n"]}
@@ -14,6 +14,7 @@ const isArray_1 = __importDefault(require("./isArray")), isObject_1 = __importDe
14
14
 
15
15
  function is(x, y) {
16
16
  return x === y ? 0 !== x || 0 !== y || 1 / x == 1 / y : x != x && y != y;
17
+ // eslint-disable-next-line no-self-compare
17
18
  }
18
19
 
19
20
  function length(obj) {
@@ -31,4 +32,4 @@ function isShallowEqual(objA, objB) {
31
32
  }
32
33
 
33
34
  exports.isShallowEqual = isShallowEqual;
34
- //# sourceMappingURL=isShallowEqual.js.map
35
+ //# sourceMappingURL=isShallowEqual.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/common/isShallowEqual.ts"],"names":[],"mappings":";;;;;;AAAA,wDAAgC;AAChC,0DAAkC;AAElC,SAAS,EAAE,CAAC,CAAM,EAAE,CAAM;IACxB,IAAI,CAAC,KAAK,CAAC,EAAE;QACX,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;KAC9C;IAED,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC5B,CAAC;AAED,SAAS,MAAM,CAAC,GAAQ;IACtB,IAAI,IAAA,iBAAO,EAAC,GAAG,CAAC,EAAE;QAChB,OAAO,GAAG,CAAC,MAAM,CAAC;KACnB;IACD,IAAI,IAAA,kBAAQ,EAAC,GAAG,CAAC,EAAE;QACjB,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC;KAChC;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AAED,SAAgB,cAAc,CAAC,IAAS,EAAE,IAAS;IACjD,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE;QAClB,OAAO,IAAI,CAAC;KACb;IAED,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE;QAC1F,OAAO,KAAK,CAAC;KACd;IAED,IAAI,IAAA,iBAAO,EAAC,IAAI,CAAC,KAAK,IAAA,iBAAO,EAAC,IAAI,CAAC,EAAE;QACnC,OAAO,KAAK,CAAC;KACd;IAED,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,MAAM,CAAC,IAAI,CAAC,EAAE;QACjC,OAAO,KAAK,CAAC;KACd;IAED,IAAI,GAAG,GAAG,IAAI,CAAC;IAEf,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAM,EAAE,EAAE;QACnC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAElB,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE;YACnB,GAAG,GAAG,KAAK,CAAC;YACZ,OAAO,GAAG,CAAC;SACZ;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;IAEH,OAAO,GAAG,CAAC;AACb,CAAC;AA9BD,wCA8BC","file":"isShallowEqual.js","sourcesContent":["import isArray from './isArray';\nimport isObject from './isObject';\n\nfunction is(x: any, y: any) {\n if (x === y) {\n return x !== 0 || y !== 0 || 1 / x === 1 / y;\n }\n // eslint-disable-next-line no-self-compare\n return x !== x && y !== y; // NaN == NaN\n}\n\nfunction length(obj: any) {\n if (isArray(obj)) {\n return obj.length;\n }\n if (isObject(obj)) {\n return Object.keys(obj).length;\n }\n return 0;\n}\n\nexport function isShallowEqual(objA: any, objB: any) {\n if (is(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n if (isArray(objA) !== isArray(objB)) {\n return false;\n }\n\n if (length(objA) !== length(objB)) {\n return false;\n }\n\n let ret = true;\n\n Object.keys(objA).forEach((k: any) => {\n const v = objA[k];\n\n if (!is(v, objB[k])) {\n ret = false;\n return ret;\n }\n return true;\n });\n\n return ret;\n}\n"]}
1
+ {"version":3,"sources":["../src/common/isShallowEqual.ts"],"names":[],"mappings":";;;;;;AAAA,wDAAgC;AAChC,0DAAkC;AAElC,SAAS,EAAE,CAAC,CAAM,EAAE,CAAM;IACxB,IAAI,CAAC,KAAK,CAAC,EAAE;QACX,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;KAC9C;IACD,2CAA2C;IAC3C,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,cAAc;AAC3C,CAAC;AAED,SAAS,MAAM,CAAC,GAAQ;IACtB,IAAI,IAAA,iBAAO,EAAC,GAAG,CAAC,EAAE;QAChB,OAAO,GAAG,CAAC,MAAM,CAAC;KACnB;IACD,IAAI,IAAA,kBAAQ,EAAC,GAAG,CAAC,EAAE;QACjB,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC;KAChC;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AAED,SAAgB,cAAc,CAAC,IAAS,EAAE,IAAS;IACjD,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE;QAClB,OAAO,IAAI,CAAC;KACb;IAED,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE;QAC1F,OAAO,KAAK,CAAC;KACd;IAED,IAAI,IAAA,iBAAO,EAAC,IAAI,CAAC,KAAK,IAAA,iBAAO,EAAC,IAAI,CAAC,EAAE;QACnC,OAAO,KAAK,CAAC;KACd;IAED,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,MAAM,CAAC,IAAI,CAAC,EAAE;QACjC,OAAO,KAAK,CAAC;KACd;IAED,IAAI,GAAG,GAAG,IAAI,CAAC;IAEf,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAM,EAAE,EAAE;QACnC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAElB,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE;YACnB,GAAG,GAAG,KAAK,CAAC;YACZ,OAAO,GAAG,CAAC;SACZ;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;IAEH,OAAO,GAAG,CAAC;AACb,CAAC;AA9BD,wCA8BC","file":"isShallowEqual.js","sourcesContent":["import isArray from './isArray';\nimport isObject from './isObject';\n\nfunction is(x: any, y: any) {\n if (x === y) {\n return x !== 0 || y !== 0 || 1 / x === 1 / y;\n }\n // eslint-disable-next-line no-self-compare\n return x !== x && y !== y; // NaN == NaN\n}\n\nfunction length(obj: any) {\n if (isArray(obj)) {\n return obj.length;\n }\n if (isObject(obj)) {\n return Object.keys(obj).length;\n }\n return 0;\n}\n\nexport function isShallowEqual(objA: any, objB: any) {\n if (is(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n if (isArray(objA) !== isArray(objB)) {\n return false;\n }\n\n if (length(objA) !== length(objB)) {\n return false;\n }\n\n let ret = true;\n\n Object.keys(objA).forEach((k: any) => {\n const v = objA[k];\n\n if (!is(v, objB[k])) {\n ret = false;\n return ret;\n }\n return true;\n });\n\n return ret;\n}\n"]}
@@ -1,2 +1,15 @@
1
+ /**
2
+ * Checks if `value` is classified as a `String` primitive or object.
3
+ * @param {*} value The value to check.
4
+ * @param {boolean} fuzzy Whether to perform fuzzy judgment, for better performance,default to `false`.
5
+ * @returns {boolean} Returns `true` if `value` is a string, else `false`.
6
+ * @example
7
+ *
8
+ * isString('abc')
9
+ * // => true
10
+ *
11
+ * isString(1)
12
+ * // => false
13
+ */
1
14
  declare const isString: (value: any, fuzzy?: boolean) => value is string;
2
15
  export default isString;
@@ -15,5 +15,17 @@ const isType_1 = __importDefault(require("./isType")), isString = (value, fuzzy
15
15
  return fuzzy ? "string" === type : "string" === type || (0, isType_1.default)(value, "String");
16
16
  };
17
17
 
18
- exports.default = isString;
19
- //# sourceMappingURL=isString.js.map
18
+ /**
19
+ * Checks if `value` is classified as a `String` primitive or object.
20
+ * @param {*} value The value to check.
21
+ * @param {boolean} fuzzy Whether to perform fuzzy judgment, for better performance,default to `false`.
22
+ * @returns {boolean} Returns `true` if `value` is a string, else `false`.
23
+ * @example
24
+ *
25
+ * isString('abc')
26
+ * // => true
27
+ *
28
+ * isString(1)
29
+ * // => false
30
+ */ exports.default = isString;
31
+ //# sourceMappingURL=isString.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/common/isString.ts"],"names":[],"mappings":";;;;;AAAA,sDAA8B;AAe9B,MAAM,QAAQ,GAAG,CAAC,KAAU,EAAE,QAAiB,KAAK,EAAmB,EAAE;IACvE,MAAM,IAAI,GAAG,OAAO,KAAK,CAAC;IAC1B,IAAI,KAAK,EAAE;QACT,OAAO,IAAI,KAAK,QAAQ,CAAC;KAC1B;IAED,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAA,gBAAM,EAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;AACtD,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC","file":"isString.js","sourcesContent":["import isType from './isType';\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n * @param {*} value The value to check.\n * @param {boolean} fuzzy Whether to perform fuzzy judgment, for better performance,default to `false`.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * isString('abc')\n * // => true\n *\n * isString(1)\n * // => false\n */\nconst isString = (value: any, fuzzy: boolean = false): value is string => {\n const type = typeof value;\n if (fuzzy) {\n return type === 'string';\n }\n\n return type === 'string' || isType(value, 'String');\n};\n\nexport default isString;\n"]}
1
+ {"version":3,"sources":["../src/common/isString.ts"],"names":[],"mappings":";;;;;AAAA,sDAA8B;AAE9B;;;;;;;;;;;;GAYG;AACH,MAAM,QAAQ,GAAG,CAAC,KAAU,EAAE,QAAiB,KAAK,EAAmB,EAAE;IACvE,MAAM,IAAI,GAAG,OAAO,KAAK,CAAC;IAC1B,IAAI,KAAK,EAAE;QACT,OAAO,IAAI,KAAK,QAAQ,CAAC;KAC1B;IAED,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAA,gBAAM,EAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;AACtD,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC","file":"isString.js","sourcesContent":["import isType from './isType';\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n * @param {*} value The value to check.\n * @param {boolean} fuzzy Whether to perform fuzzy judgment, for better performance,default to `false`.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * isString('abc')\n * // => true\n *\n * isString(1)\n * // => false\n */\nconst isString = (value: any, fuzzy: boolean = false): value is string => {\n const type = typeof value;\n if (fuzzy) {\n return type === 'string';\n }\n\n return type === 'string' || isType(value, 'String');\n};\n\nexport default isString;\n"]}
@@ -1,2 +1,8 @@
1
+ /**
2
+ * check value type
3
+ * @param value the value to check
4
+ * @param type type
5
+ * @returns
6
+ */
1
7
  declare const isType: (value: any, type: string) => boolean;
2
8
  export default isType;
@@ -4,7 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  });
6
6
 
7
+ /**
8
+ * check value type
9
+ * @param value the value to check
10
+ * @param type type
11
+ * @returns
12
+ */
7
13
  const isType = (value, type) => Object.prototype.toString.call(value) === `[object ${type}]`;
8
14
 
9
15
  exports.default = isType;
10
- //# sourceMappingURL=isType.js.map
16
+ //# sourceMappingURL=isType.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/common/isType.ts"],"names":[],"mappings":";;AAMA,MAAM,MAAM,GAAG,CAAC,KAAU,EAAE,IAAY,EAAW,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,WAAW,IAAI,GAAG,CAAC;AAEnH,kBAAe,MAAM,CAAC","file":"isType.js","sourcesContent":["/**\n * check value type\n * @param value the value to check\n * @param type type\n * @returns\n */\nconst isType = (value: any, type: string): boolean => Object.prototype.toString.call(value) === `[object ${type}]`;\n\nexport default isType;\n"]}
1
+ {"version":3,"sources":["../src/common/isType.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,MAAM,MAAM,GAAG,CAAC,KAAU,EAAE,IAAY,EAAW,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,WAAW,IAAI,GAAG,CAAC;AAEnH,kBAAe,MAAM,CAAC","file":"isType.js","sourcesContent":["/**\n * check value type\n * @param value the value to check\n * @param type type\n * @returns\n */\nconst isType = (value: any, type: string): boolean => Object.prototype.toString.call(value) === `[object ${type}]`;\n\nexport default isType;\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/common/isValidNumber.ts"],"names":[],"mappings":";;;;;AAAA,0DAAkC;AAElC,MAAM,aAAa,GAAG,CAAC,KAAU,EAAmB,EAAE;IAEpD,OAAO,IAAA,kBAAQ,EAAC,KAAK,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACnD,CAAC,CAAC;AAEF,kBAAe,aAAa,CAAC","file":"isValidNumber.js","sourcesContent":["import isNumber from './isNumber';\n\nconst isValidNumber = (value: any): value is number => {\n // isFinate 包含来 isNaN 的判断\n return isNumber(value) && Number.isFinite(value);\n};\n\nexport default isValidNumber;\n"]}
1
+ {"version":3,"sources":["../src/common/isValidNumber.ts"],"names":[],"mappings":";;;;;AAAA,0DAAkC;AAElC,MAAM,aAAa,GAAG,CAAC,KAAU,EAAmB,EAAE;IACpD,yBAAyB;IACzB,OAAO,IAAA,kBAAQ,EAAC,KAAK,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACnD,CAAC,CAAC;AAEF,kBAAe,aAAa,CAAC","file":"isValidNumber.js","sourcesContent":["import isNumber from './isNumber';\n\nconst isValidNumber = (value: any): value is number => {\n // isFinate 包含来 isNaN 的判断\n return isNumber(value) && Number.isFinite(value);\n};\n\nexport default isValidNumber;\n"]}