@dxyl/utils 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/dist/index.es.js +8985 -0
  2. package/dist/index.umd.js +28 -0
  3. package/lib/glslang/glslang.d.ts +14 -0
  4. package/lib/glslang/glslang.js +113 -0
  5. package/lib/glslang/glslang.wasm +0 -0
  6. package/lib/twgsl/twgsl.js +53 -0
  7. package/lib/twgsl/twgsl.wasm +0 -0
  8. package/package.json +27 -34
  9. package/readme.md +0 -0
  10. package/types/Color.d.ts +69 -0
  11. package/types/Options.d.ts +70 -0
  12. package/types/antv-util/color/arr2rgb.d.ts +12 -0
  13. package/types/antv-util/color/gradient.d.ts +6 -0
  14. package/types/antv-util/color/index.d.ts +4 -0
  15. package/types/antv-util/color/rgb2arr.d.ts +6 -0
  16. package/types/antv-util/color/tocssgradient.d.ts +1 -0
  17. package/types/antv-util/color/torgb.d.ts +6 -0
  18. package/types/antv-util/helper/index.d.ts +2 -0
  19. package/types/antv-util/helper/mod.d.ts +1 -0
  20. package/types/antv-util/helper/to-radian.d.ts +1 -0
  21. package/types/antv-util/index.d.ts +3 -0
  22. package/types/antv-util/matrix/index.d.ts +27 -0
  23. package/types/antv-util/path/convert/path-2-absolute.d.ts +2 -0
  24. package/types/antv-util/path/convert/path-2-curve.d.ts +2 -0
  25. package/types/antv-util/path/convert/path-2-string.d.ts +6 -0
  26. package/types/antv-util/path/index.d.ts +17 -0
  27. package/types/antv-util/path/parser/finalize-segment.d.ts +5 -0
  28. package/types/antv-util/path/parser/is-arc-command.d.ts +4 -0
  29. package/types/antv-util/path/parser/is-digit-start.d.ts +6 -0
  30. package/types/antv-util/path/parser/is-path-command.d.ts +4 -0
  31. package/types/antv-util/path/parser/is-space.d.ts +4 -0
  32. package/types/antv-util/path/parser/params-count.d.ts +13 -0
  33. package/types/antv-util/path/parser/params-parser.d.ts +10 -0
  34. package/types/antv-util/path/parser/parse-path-string.d.ts +6 -0
  35. package/types/antv-util/path/parser/path-parser.d.ts +16 -0
  36. package/types/antv-util/path/parser/scan-flag.d.ts +6 -0
  37. package/types/antv-util/path/parser/scan-param.d.ts +6 -0
  38. package/types/antv-util/path/parser/scan-segment.d.ts +6 -0
  39. package/types/antv-util/path/parser/skip-spaces.d.ts +7 -0
  40. package/types/antv-util/path/process/arc-2-cubic.d.ts +7 -0
  41. package/types/antv-util/path/process/clone-path.d.ts +2 -0
  42. package/types/antv-util/path/process/fix-arc.d.ts +2 -0
  43. package/types/antv-util/path/process/line-2-cubic.d.ts +1 -0
  44. package/types/antv-util/path/process/normalize-path.d.ts +8 -0
  45. package/types/antv-util/path/process/normalize-segment.d.ts +6 -0
  46. package/types/antv-util/path/process/quad-2-cubic.d.ts +1 -0
  47. package/types/antv-util/path/process/reverse-curve.d.ts +2 -0
  48. package/types/antv-util/path/process/round-path.d.ts +6 -0
  49. package/types/antv-util/path/process/segment-2-cubic.d.ts +2 -0
  50. package/types/antv-util/path/types.d.ts +122 -0
  51. package/types/antv-util/path/util/distance-square-root.d.ts +1 -0
  52. package/types/antv-util/path/util/equalize-segments.d.ts +2 -0
  53. package/types/antv-util/path/util/get-draw-direction.d.ts +2 -0
  54. package/types/antv-util/path/util/get-path-area.d.ts +8 -0
  55. package/types/antv-util/path/util/get-path-bbox-total-length.d.ts +5 -0
  56. package/types/antv-util/path/util/get-path-bbox.d.ts +5 -0
  57. package/types/antv-util/path/util/get-point-at-length.d.ts +5 -0
  58. package/types/antv-util/path/util/get-properties-at-length.d.ts +6 -0
  59. package/types/antv-util/path/util/get-properties-at-point.d.ts +7 -0
  60. package/types/antv-util/path/util/get-rotated-curve.d.ts +2 -0
  61. package/types/antv-util/path/util/get-total-length.d.ts +8 -0
  62. package/types/antv-util/path/util/is-absolute-array.d.ts +6 -0
  63. package/types/antv-util/path/util/is-curve-array.d.ts +9 -0
  64. package/types/antv-util/path/util/is-normalized-array.d.ts +7 -0
  65. package/types/antv-util/path/util/is-path-array.d.ts +5 -0
  66. package/types/antv-util/path/util/is-point-in-stroke.d.ts +5 -0
  67. package/types/antv-util/path/util/mid-point.d.ts +1 -0
  68. package/types/antv-util/path/util/path-length-factory.d.ts +7 -0
  69. package/types/antv-util/path/util/rotate-vector.d.ts +4 -0
  70. package/types/antv-util/path/util/segment-arc-factory.d.ts +6 -0
  71. package/types/antv-util/path/util/segment-cubic-factory.d.ts +6 -0
  72. package/types/antv-util/path/util/segment-line-factory.d.ts +6 -0
  73. package/types/antv-util/path/util/segment-quad-factory.d.ts +6 -0
  74. package/types/callbacks.d.ts +30 -0
  75. package/types/color/colord/src/colorModels/cmyk.d.ts +23 -0
  76. package/types/color/colord/src/colorModels/cmykString.d.ts +7 -0
  77. package/types/color/colord/src/colorModels/hex.d.ts +5 -0
  78. package/types/color/colord/src/colorModels/hsl.d.ts +8 -0
  79. package/types/color/colord/src/colorModels/hslString.d.ts +7 -0
  80. package/types/color/colord/src/colorModels/hsv.d.ts +6 -0
  81. package/types/color/colord/src/colorModels/hwb.d.ts +6 -0
  82. package/types/color/colord/src/colorModels/hwbString.d.ts +7 -0
  83. package/types/color/colord/src/colorModels/lab.d.ts +18 -0
  84. package/types/color/colord/src/colorModels/lch.d.ts +19 -0
  85. package/types/color/colord/src/colorModels/lchString.d.ts +7 -0
  86. package/types/color/colord/src/colorModels/rgb.d.ts +13 -0
  87. package/types/color/colord/src/colorModels/rgbString.d.ts +7 -0
  88. package/types/color/colord/src/colorModels/xyz.d.ts +30 -0
  89. package/types/color/colord/src/colord.d.ts +103 -0
  90. package/types/color/colord/src/constants.d.ts +10 -0
  91. package/types/color/colord/src/extend.d.ts +4 -0
  92. package/types/color/colord/src/get/getBrightness.d.ts +7 -0
  93. package/types/color/colord/src/get/getContrast.d.ts +6 -0
  94. package/types/color/colord/src/get/getLuminance.d.ts +6 -0
  95. package/types/color/colord/src/get/getPerceivedDifference.d.ts +24 -0
  96. package/types/color/colord/src/helpers.d.ts +20 -0
  97. package/types/color/colord/src/index.d.ts +5 -0
  98. package/types/color/colord/src/manipulate/changeAlpha.d.ts +2 -0
  99. package/types/color/colord/src/manipulate/invert.d.ts +2 -0
  100. package/types/color/colord/src/manipulate/lighten.d.ts +2 -0
  101. package/types/color/colord/src/manipulate/mix.d.ts +2 -0
  102. package/types/color/colord/src/manipulate/saturate.d.ts +2 -0
  103. package/types/color/colord/src/parse.d.ts +8 -0
  104. package/types/color/colord/src/plugins/a11y.d.ts +38 -0
  105. package/types/color/colord/src/plugins/cmyk.d.ts +24 -0
  106. package/types/color/colord/src/plugins/harmonies.d.ts +16 -0
  107. package/types/color/colord/src/plugins/hwb.d.ts +23 -0
  108. package/types/color/colord/src/plugins/lab.d.ts +23 -0
  109. package/types/color/colord/src/plugins/lch.d.ts +24 -0
  110. package/types/color/colord/src/plugins/minify.d.ts +20 -0
  111. package/types/color/colord/src/plugins/mix.d.ts +27 -0
  112. package/types/color/colord/src/plugins/names.d.ts +19 -0
  113. package/types/color/colord/src/plugins/xyz.d.ts +14 -0
  114. package/types/color/colord/src/random.d.ts +2 -0
  115. package/types/color/colord/src/types.d.ts +67 -0
  116. package/types/data/immer.d.ts +262 -0
  117. package/types/data/immutable.d.ts +5127 -0
  118. package/types/data/mobx.d.ts +154 -0
  119. package/types/data/reactivity.d.ts +755 -0
  120. package/types/data/signals.d.ts +144 -0
  121. package/types/deepmerge.d.ts +16 -0
  122. package/types/events/eventTarget.d.ts +93 -0
  123. package/types/events/event_emiter.d.ts +43 -0
  124. package/types/events/eventemitter3.d.ts +135 -0
  125. package/types/events/mitt.d.ts +21 -0
  126. package/types/fast-deep-equal.d.ts +1 -0
  127. package/types/index.d.ts +20 -0
  128. package/types/ismobilejs.d.ts +46 -0
  129. package/types/lodash/augment.d.ts +2 -0
  130. package/types/lodash/cache.d.ts +14 -0
  131. package/types/lodash/clamp.d.ts +2 -0
  132. package/types/lodash/clear-animation-frame.d.ts +1 -0
  133. package/types/lodash/clone.d.ts +2 -0
  134. package/types/lodash/contains.d.ts +2 -0
  135. package/types/lodash/debounce.d.ts +2 -0
  136. package/types/lodash/deep-mix.d.ts +2 -0
  137. package/types/lodash/difference.d.ts +11 -0
  138. package/types/lodash/each.d.ts +2 -0
  139. package/types/lodash/ends-with.d.ts +3 -0
  140. package/types/lodash/every.d.ts +7 -0
  141. package/types/lodash/extend.d.ts +2 -0
  142. package/types/lodash/filter.d.ts +2 -0
  143. package/types/lodash/find-index.d.ts +2 -0
  144. package/types/lodash/find.d.ts +3 -0
  145. package/types/lodash/first-value.d.ts +2 -0
  146. package/types/lodash/fixed-base.d.ts +2 -0
  147. package/types/lodash/flatten-deep.d.ts +12 -0
  148. package/types/lodash/flatten.d.ts +11 -0
  149. package/types/lodash/for-in.d.ts +2 -0
  150. package/types/lodash/get-range.d.ts +6 -0
  151. package/types/lodash/get-type.d.ts +2 -0
  152. package/types/lodash/get-wrap-behavior.d.ts +9 -0
  153. package/types/lodash/get.d.ts +8 -0
  154. package/types/lodash/group-by.d.ts +6 -0
  155. package/types/lodash/group-to-map.d.ts +8 -0
  156. package/types/lodash/group.d.ts +2 -0
  157. package/types/lodash/has-key.d.ts +2 -0
  158. package/types/lodash/has-value.d.ts +2 -0
  159. package/types/lodash/has.d.ts +2 -0
  160. package/types/lodash/head.d.ts +1 -0
  161. package/types/lodash/identity.d.ts +2 -0
  162. package/types/lodash/index-of.d.ts +2 -0
  163. package/types/lodash/index.d.ts +108 -0
  164. package/types/lodash/is-arguments.d.ts +2 -0
  165. package/types/lodash/is-array-like.d.ts +2 -0
  166. package/types/lodash/is-array.d.ts +2 -0
  167. package/types/lodash/is-boolean.d.ts +2 -0
  168. package/types/lodash/is-date.d.ts +2 -0
  169. package/types/lodash/is-decimal.d.ts +2 -0
  170. package/types/lodash/is-element.d.ts +6 -0
  171. package/types/lodash/is-empty.d.ts +2 -0
  172. package/types/lodash/is-equal-with.d.ts +24 -0
  173. package/types/lodash/is-equal.d.ts +2 -0
  174. package/types/lodash/is-error.d.ts +2 -0
  175. package/types/lodash/is-even.d.ts +2 -0
  176. package/types/lodash/is-finite.d.ts +1 -0
  177. package/types/lodash/is-function.d.ts +2 -0
  178. package/types/lodash/is-integer.d.ts +2 -0
  179. package/types/lodash/is-match.d.ts +2 -0
  180. package/types/lodash/is-negative.d.ts +2 -0
  181. package/types/lodash/is-nil.d.ts +2 -0
  182. package/types/lodash/is-null.d.ts +2 -0
  183. package/types/lodash/is-number-equal.d.ts +1 -0
  184. package/types/lodash/is-number.d.ts +2 -0
  185. package/types/lodash/is-object-like.d.ts +2 -0
  186. package/types/lodash/is-object.d.ts +2 -0
  187. package/types/lodash/is-odd.d.ts +2 -0
  188. package/types/lodash/is-plain-object.d.ts +2 -0
  189. package/types/lodash/is-positive.d.ts +2 -0
  190. package/types/lodash/is-prototype.d.ts +2 -0
  191. package/types/lodash/is-reg-exp.d.ts +2 -0
  192. package/types/lodash/is-segment-equal.d.ts +2 -0
  193. package/types/lodash/is-string.d.ts +2 -0
  194. package/types/lodash/is-type.d.ts +2 -0
  195. package/types/lodash/is-undefined.d.ts +2 -0
  196. package/types/lodash/keys.d.ts +2 -0
  197. package/types/lodash/last.d.ts +1 -0
  198. package/types/lodash/lower-case.d.ts +2 -0
  199. package/types/lodash/lower-first.d.ts +2 -0
  200. package/types/lodash/map-values.d.ts +6 -0
  201. package/types/lodash/map.d.ts +2 -0
  202. package/types/lodash/max-by.d.ts +16 -0
  203. package/types/lodash/max.d.ts +19 -0
  204. package/types/lodash/memoize.d.ts +11 -0
  205. package/types/lodash/merge.d.ts +7 -0
  206. package/types/lodash/min-by.d.ts +16 -0
  207. package/types/lodash/min.d.ts +19 -0
  208. package/types/lodash/mix.d.ts +1 -0
  209. package/types/lodash/mod.d.ts +2 -0
  210. package/types/lodash/noop.d.ts +2 -0
  211. package/types/lodash/number2color.d.ts +2 -0
  212. package/types/lodash/omit.d.ts +3 -0
  213. package/types/lodash/parse-radius.d.ts +9 -0
  214. package/types/lodash/pick.d.ts +16 -0
  215. package/types/lodash/pull-at.d.ts +2 -0
  216. package/types/lodash/pull.d.ts +2 -0
  217. package/types/lodash/reduce.d.ts +3 -0
  218. package/types/lodash/remove.d.ts +2 -0
  219. package/types/lodash/request-animation-frame.d.ts +1 -0
  220. package/types/lodash/set.d.ts +8 -0
  221. package/types/lodash/size.d.ts +1 -0
  222. package/types/lodash/some.d.ts +7 -0
  223. package/types/lodash/sort-by.d.ts +7 -0
  224. package/types/lodash/starts-with.d.ts +3 -0
  225. package/types/lodash/substitute.d.ts +5 -0
  226. package/types/lodash/throttle.d.ts +6 -0
  227. package/types/lodash/to-array.d.ts +2 -0
  228. package/types/lodash/to-degree.d.ts +2 -0
  229. package/types/lodash/to-integer.d.ts +1 -0
  230. package/types/lodash/to-radian.d.ts +2 -0
  231. package/types/lodash/to-string.d.ts +2 -0
  232. package/types/lodash/types/index.d.ts +3 -0
  233. package/types/lodash/union.d.ts +2 -0
  234. package/types/lodash/uniq.d.ts +1 -0
  235. package/types/lodash/unique-id.d.ts +2 -0
  236. package/types/lodash/upper-case.d.ts +2 -0
  237. package/types/lodash/upper-first.d.ts +2 -0
  238. package/types/lodash/values-of-key.d.ts +2 -0
  239. package/types/lodash/values.d.ts +2 -0
  240. package/types/lodash/wrap-behavior.d.ts +9 -0
  241. package/types/parse-svg-path.d.ts +19 -0
  242. package/types/priority_queue.d.ts +41 -0
  243. package/types/radash/array.d.ts +209 -0
  244. package/types/radash/async.d.ts +99 -0
  245. package/types/radash/curry.d.ts +113 -0
  246. package/types/radash/index.d.ts +10 -0
  247. package/types/radash/number.d.ts +27 -0
  248. package/types/radash/object.d.ts +112 -0
  249. package/types/radash/random.d.ts +11 -0
  250. package/types/radash/series.d.ts +13 -0
  251. package/types/radash/string.d.ts +71 -0
  252. package/types/radash/typed.d.ts +26 -0
  253. package/types/stats.module.d.ts +3 -0
  254. package/README.md +0 -1
  255. package/dist/cjs/index.js +0 -19
  256. package/dist/umd/index.js +0 -23
  257. package/esm/extend.js +0 -3
  258. package/esm/index.js +0 -3
  259. package/lib/extend.js +0 -6
  260. package/lib/index.js +0 -6
  261. package/src/extend.ts +0 -6
  262. package/src/index.ts +0 -6
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 获取封装的事件
3
+ * @protected
4
+ * @param {Object} obj 对象
5
+ * @param {String} action 事件名称
6
+ * @return {Function} 返回事件处理函数
7
+ */
8
+ declare function getWrapBehavior(obj: object, action: string): Function;
9
+ export default getWrapBehavior;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * https://github.com/developit/dlv/blob/master/index.js
3
+ * @param obj
4
+ * @param key
5
+ * @param defaultValue
6
+ */
7
+ declare const _default: (obj: any, key: string | any[], defaultValue?: any) => any;
8
+ export default _default;
@@ -0,0 +1,6 @@
1
+ export interface ObjectType<T> {
2
+ [key: string]: T[];
3
+ }
4
+ declare function groupBy<T>(data: T[], condition: (item: T) => string): ObjectType<T>;
5
+ declare function groupBy<T>(data: T[], condition: string): ObjectType<T>;
6
+ export default groupBy;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * 将数据分组成 map
3
+ * @param data
4
+ * @param condition
5
+ */
6
+ export default function groupToMap(data: any, condition: string[] | string | ((row: any) => string)): import('./group-by').ObjectType<any> | {
7
+ 0: any;
8
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: <T>(data: T[], condition: ((v: T) => string) | string | string[]) => T[][];
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import { default as has } from './has';
2
+ export default has;
@@ -0,0 +1,2 @@
1
+ declare const _default: (obj: object, value: any) => boolean;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: (obj: object, key: any) => boolean;
2
+ export default _default;
@@ -0,0 +1 @@
1
+ export default function head(o: unknown): any;
@@ -0,0 +1,2 @@
1
+ declare const _default: <T>(v: T) => T;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const indexOf: <T>(arr: T[], obj: T) => number;
2
+ export default indexOf;
@@ -0,0 +1,108 @@
1
+ export { default as contains, default as includes } from './contains';
2
+ export { default as difference } from './difference';
3
+ export { default as find } from './find';
4
+ export { default as findIndex } from './find-index';
5
+ export { default as firstValue } from './first-value';
6
+ export { default as flatten } from './flatten';
7
+ export { default as flattenDeep } from './flatten-deep';
8
+ export { default as getRange } from './get-range';
9
+ export { default as pull } from './pull';
10
+ export { default as pullAt } from './pull-at';
11
+ export { default as reduce } from './reduce';
12
+ export { default as remove } from './remove';
13
+ export { default as sortBy } from './sort-by';
14
+ export { default as union } from './union';
15
+ export { default as uniq } from './uniq';
16
+ export { default as valuesOfKey } from './values-of-key';
17
+ export { default as head } from './head';
18
+ export { default as last } from './last';
19
+ export { default as startsWith } from './starts-with';
20
+ export { default as endsWith } from './ends-with';
21
+ export { default as filter } from './filter';
22
+ export { default as every } from './every';
23
+ export { default as some } from './some';
24
+ export { default as group } from './group';
25
+ export { default as groupBy } from './group-by';
26
+ export { default as groupToMap } from './group-to-map';
27
+ export { default as getWrapBehavior } from './get-wrap-behavior';
28
+ export { default as wrapBehavior } from './wrap-behavior';
29
+ export { default as number2color } from './number2color';
30
+ export { default as parseRadius } from './parse-radius';
31
+ export { default as clamp } from './clamp';
32
+ export { default as fixedBase } from './fixed-base';
33
+ export { default as isDecimal } from './is-decimal';
34
+ export { default as isEven } from './is-even';
35
+ export { default as isInteger } from './is-integer';
36
+ export { default as isNegative } from './is-negative';
37
+ export { default as isNumberEqual } from './is-number-equal';
38
+ export { default as isOdd } from './is-odd';
39
+ export { default as isPositive } from './is-positive';
40
+ export { default as max } from './max';
41
+ export { default as maxBy } from './max-by';
42
+ export { default as min } from './min';
43
+ export { default as minBy } from './min-by';
44
+ export { default as mod } from './mod';
45
+ export { default as toDegree } from './to-degree';
46
+ export { default as toInteger } from './to-integer';
47
+ export { default as toRadian } from './to-radian';
48
+ export { default as forIn } from './for-in';
49
+ export { default as has } from './has';
50
+ export { default as hasKey } from './has-key';
51
+ export { default as hasValue } from './has-value';
52
+ export { default as keys } from './keys';
53
+ export { default as isMatch } from './is-match';
54
+ export { default as values } from './values';
55
+ export { default as lowerCase } from './lower-case';
56
+ export { default as lowerFirst } from './lower-first';
57
+ export { default as substitute } from './substitute';
58
+ export { default as upperCase } from './upper-case';
59
+ export { default as upperFirst } from './upper-first';
60
+ export { default as getType } from './get-type';
61
+ export { default as isArguments } from './is-arguments';
62
+ export { default as isArray } from './is-array';
63
+ export { default as isArrayLike } from './is-array-like';
64
+ export { default as isBoolean } from './is-boolean';
65
+ export { default as isDate } from './is-date';
66
+ export { default as isError } from './is-error';
67
+ export { default as isFunction } from './is-function';
68
+ export { default as isFinite } from './is-finite';
69
+ export { default as isNil } from './is-nil';
70
+ export { default as isNull } from './is-null';
71
+ export { default as isNumber } from './is-number';
72
+ export { default as isObject } from './is-object';
73
+ export { default as isObjectLike } from './is-object-like';
74
+ export { default as isPlainObject } from './is-plain-object';
75
+ export { default as isPrototype } from './is-prototype';
76
+ export { default as isRegExp } from './is-reg-exp';
77
+ export { default as isString } from './is-string';
78
+ export { default as isType } from './is-type';
79
+ export { default as isUndefined } from './is-undefined';
80
+ export { default as isElement } from './is-element';
81
+ export { default as requestAnimationFrame } from './request-animation-frame';
82
+ export { default as clearAnimationFrame } from './clear-animation-frame';
83
+ export { default as augment } from './augment';
84
+ export { default as clone } from './clone';
85
+ export { default as debounce } from './debounce';
86
+ export { default as memoize } from './memoize';
87
+ export { default as deepMix } from './deep-mix';
88
+ export { default as each } from './each';
89
+ export { default as extend } from './extend';
90
+ export { default as indexOf } from './index-of';
91
+ export { default as isEmpty } from './is-empty';
92
+ export { default as isEqual } from './is-equal';
93
+ export { default as isEqualWith } from './is-equal-with';
94
+ export { default as map } from './map';
95
+ export { default as mapValues } from './map-values';
96
+ export { default as mix, default as assign } from './mix';
97
+ export { default as get } from './get';
98
+ export { default as set } from './set';
99
+ export { default as pick } from './pick';
100
+ export { default as omit } from './omit';
101
+ export { default as throttle } from './throttle';
102
+ export { default as toArray } from './to-array';
103
+ export { default as toString } from './to-string';
104
+ export { default as uniqueId } from './unique-id';
105
+ export { default as noop } from './noop';
106
+ export { default as identity } from './identity';
107
+ export { default as size } from './size';
108
+ export { default as Cache } from './cache';
@@ -0,0 +1,2 @@
1
+ declare const isArguments: (value: any) => boolean;
2
+ export default isArguments;
@@ -0,0 +1,2 @@
1
+ declare const isArrayLike: (value: any) => boolean;
2
+ export default isArrayLike;
@@ -0,0 +1,2 @@
1
+ declare const _default: (value: any) => value is Array<any>;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const isBoolean: (value: any) => value is boolean;
2
+ export default isBoolean;
@@ -0,0 +1,2 @@
1
+ declare const isDate: (value: any) => value is Date;
2
+ export default isDate;
@@ -0,0 +1,2 @@
1
+ declare const isDecimal: (num: any) => boolean;
2
+ export default isDecimal;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * 判断是否HTML元素
3
+ * @return {Boolean} 是否HTML元素
4
+ */
5
+ declare const isElement: (o: any) => boolean;
6
+ export default isElement;
@@ -0,0 +1,2 @@
1
+ declare function isEmpty(value: any): boolean;
2
+ export default isEmpty;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @param {*} value The value to compare.
3
+ * @param {*} other The other value to compare.
4
+ * @param {Function} [fn] The function to customize comparisons.
5
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
6
+ * @example
7
+ *
8
+ * function isGreeting(value) {
9
+ * return /^h(?:i|ello)$/.test(value);
10
+ * }
11
+ *
12
+ * function customizer(objValue, othValue) {
13
+ * if (isGreeting(objValue) && isGreeting(othValue)) {
14
+ * return true;
15
+ * }
16
+ * }
17
+ *
18
+ * var array = ['hello', 'goodbye'];
19
+ * var other = ['hi', 'goodbye'];
20
+ *
21
+ * isEqualWith(array, other, customizer); // => true
22
+ */
23
+ declare const _default: <T>(value: T, other: T, fn: (v1: T, v2: T) => boolean) => boolean;
24
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const isEqual: (value: any, other: any) => boolean;
2
+ export default isEqual;
@@ -0,0 +1,2 @@
1
+ declare const isError: (value: any) => value is Error;
2
+ export default isError;
@@ -0,0 +1,2 @@
1
+ declare const isEven: (num: any) => boolean;
2
+ export default isEven;
@@ -0,0 +1 @@
1
+ export default function (value: any): value is number;
@@ -0,0 +1,2 @@
1
+ declare const _default: (value: any) => value is Function;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const isInteger: (number: unknown) => boolean;
2
+ export default isInteger;
@@ -0,0 +1,2 @@
1
+ declare function isMatch(obj: any, attrs: any): boolean;
2
+ export default isMatch;
@@ -0,0 +1,2 @@
1
+ declare const isNegative: (num: any) => boolean;
2
+ export default isNegative;
@@ -0,0 +1,2 @@
1
+ declare const isNil: (value: any) => value is null | undefined;
2
+ export default isNil;
@@ -0,0 +1,2 @@
1
+ declare const isNull: (value: any) => value is null;
2
+ export default isNull;
@@ -0,0 +1 @@
1
+ export default function isNumberEqual(a: number, b: number, precision?: number): boolean;
@@ -0,0 +1,2 @@
1
+ declare const isNumber: (value: any) => value is number;
2
+ export default isNumber;
@@ -0,0 +1,2 @@
1
+ declare const isObjectLike: (value: any) => value is object;
2
+ export default isObjectLike;
@@ -0,0 +1,2 @@
1
+ declare const _default: <T = object>(value: any) => value is T;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const isOdd: (num: any) => boolean;
2
+ export default isOdd;
@@ -0,0 +1,2 @@
1
+ declare const isPlainObject: (value: any) => value is object;
2
+ export default isPlainObject;
@@ -0,0 +1,2 @@
1
+ declare const isPositive: (num: any) => boolean;
2
+ export default isPositive;
@@ -0,0 +1,2 @@
1
+ declare const isPrototype: (value: any) => boolean;
2
+ export default isPrototype;
@@ -0,0 +1,2 @@
1
+ declare const isRegExp: (str: any) => str is RegExp;
2
+ export default isRegExp;
@@ -0,0 +1,2 @@
1
+ declare const _default: (obj1: any, obj2: any) => boolean;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: (str: any) => str is string;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const isType: (value: any, type: string) => boolean;
2
+ export default isType;
@@ -0,0 +1,2 @@
1
+ declare const isUndefined: (value: any) => value is undefined;
2
+ export default isUndefined;
@@ -0,0 +1,2 @@
1
+ declare const keys: (obj: any) => any[];
2
+ export default keys;
@@ -0,0 +1 @@
1
+ export default function last(o: unknown): any;
@@ -0,0 +1,2 @@
1
+ declare const lowerCase: (str: string) => string;
2
+ export default lowerCase;
@@ -0,0 +1,2 @@
1
+ declare const lowerFirst: (value: string) => string;
2
+ export default lowerFirst;
@@ -0,0 +1,6 @@
1
+ declare const _default: <T>(object: {
2
+ [key: string]: T;
3
+ }, func?: (value: T, key: string) => any) => {
4
+ [key: string]: any;
5
+ };
6
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const map: <T, G>(arr: T[], func: (v: T, idx: number) => G) => G[];
2
+ export default map;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @param {Array} arr The array to iterate over.
3
+ * @param {Function} [fn] The iteratee invoked per element.
4
+ * @return {*} Returns the maximum value.
5
+ * @example
6
+ *
7
+ * var objects = [{ 'n': 1 }, { 'n': 2 }];
8
+ *
9
+ * maxBy(objects, function(o) { return o.n; });
10
+ * // => { 'n': 2 }
11
+ *
12
+ * maxBy(objects, 'n');
13
+ * // => { 'n': 2 }
14
+ */
15
+ declare const _default: <T>(arr: T[], fn: ((v: T) => number) | string) => T | undefined;
16
+ export default _default;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @param {Array} arr The array to iterate over.
3
+ * @return {*} Returns the maximum value.
4
+ * @example
5
+ *
6
+ * max([1, 2]);
7
+ * // => 2
8
+ *
9
+ * max([]);
10
+ * // => undefined
11
+ *
12
+ * const data = new Array(1250010).fill(1).map((d,idx) => idx);
13
+ *
14
+ * max(data);
15
+ * // => 1250010
16
+ * // Math.max(...data) will encounter "Maximum call stack size exceeded" error
17
+ */
18
+ declare const _default: (arr: number[]) => number | undefined;
19
+ export default _default;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * _.memoize(calColor);
3
+ * _.memoize(calColor, (...args) => args[0]);
4
+ * @param f
5
+ * @param resolver
6
+ */
7
+ declare const _default: (f: Function, resolver?: (...args: any[]) => string) => {
8
+ (...args: any[]): any;
9
+ cache: Map<any, any>;
10
+ };
11
+ export default _default;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 将数组展开
3
+ * todo 和 flatten 是一个意思吧?@绝云
4
+ * @param dataArray
5
+ */
6
+ declare const _default: <T>(dataArray: T[]) => T[];
7
+ export default _default;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @param {Array} arr The array to iterate over.
3
+ * @param {Function} [fn] The iteratee invoked per element.
4
+ * @return {*} Returns the minimum value.
5
+ * @example
6
+ *
7
+ * var objects = [{ 'n': 1 }, { 'n': 2 }];
8
+ *
9
+ * minBy(objects, function(o) { return o.n; });
10
+ * // => { 'n': 1 }
11
+ *
12
+ * minBy(objects, 'n');
13
+ * // => { 'n': 1 }
14
+ */
15
+ declare const _default: <T>(arr: T[], fn: ((v: T) => number) | string) => T | undefined;
16
+ export default _default;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @param {Array} arr The array to iterate over.
3
+ * @return {*} Returns the minimum value.
4
+ * @example
5
+ *
6
+ * min([1, 2]);
7
+ * // => 1
8
+ *
9
+ * min([]);
10
+ * // => undefined
11
+ *
12
+ * const data = new Array(1250010).fill(1).map((d,idx) => idx);
13
+ *
14
+ * min(data);
15
+ * // => 1250010
16
+ * // Math.min(...data) will encounter "Maximum call stack size exceeded" error
17
+ */
18
+ declare const _default: (arr: number[]) => number | undefined;
19
+ export default _default;
@@ -0,0 +1 @@
1
+ export default function mix<Base, A, B, C>(dist: Base & A & B & C, src1?: A, src2?: B, src3?: C): Base & A & B & C;
@@ -0,0 +1,2 @@
1
+ declare const mod: (n: number, m: number) => number;
2
+ export default mod;
@@ -0,0 +1,2 @@
1
+ declare const _default: () => void;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare function numberToColor(num: number): string;
2
+ export default numberToColor;
@@ -0,0 +1,3 @@
1
+ import { ObjectType } from './types';
2
+ declare const _default: <T>(obj: ObjectType<T>, keys: string[]) => ObjectType<T>;
3
+ export default _default;
@@ -0,0 +1,9 @@
1
+ export interface RadiusType {
2
+ r1: number;
3
+ r2: number;
4
+ r3: number;
5
+ r4: number;
6
+ }
7
+ declare function parseRadius(radius: number): RadiusType;
8
+ declare function parseRadius(radius: number[]): RadiusType;
9
+ export default parseRadius;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Creates an object composed of the picked `object` properties.
3
+ *
4
+ * @param {Object} object The source object.
5
+ * @param {...(string[])} [paths] The property paths to pick.
6
+ * @returns {Object} Returns the new object.
7
+ * @example
8
+ *
9
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
10
+ * pick(object, ['a', 'c']); // => { 'a': 1, 'c': 3 }
11
+ */
12
+ export interface ObjectType<T> {
13
+ [key: string]: T;
14
+ }
15
+ declare const _default: <T>(object: ObjectType<T>, keys: string[]) => ObjectType<T>;
16
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const pullAt: <T>(arr: T[], indexes: number[]) => T[];
2
+ export default pullAt;
@@ -0,0 +1,2 @@
1
+ declare const pull: <T>(arr: T[], ...values: any[]) => T[];
2
+ export default pull;
@@ -0,0 +1,3 @@
1
+ import { ObjectType } from './types';
2
+ declare const reduce: <T, G>(arr: G[] | ObjectType<T>, fn: (result: T, data: G, idx: string | number) => T, init: T) => T;
3
+ export default reduce;
@@ -0,0 +1,2 @@
1
+ declare const remove: <T>(arr: T[], predicate: (value: T, idx: number, arr?: T[]) => boolean) => T[];
2
+ export default remove;
@@ -0,0 +1 @@
1
+ export default function requestAnimationFrame(fn: FrameRequestCallback): number;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * https://github.com/developit/dlv/blob/master/index.js
3
+ * @param obj
4
+ * @param path
5
+ * @param value
6
+ */
7
+ declare const _default: (obj: any, path: string | any[], value: any) => any;
8
+ export default _default;
@@ -0,0 +1 @@
1
+ export default function size(o: unknown): number;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 只要有一个满足条件就返回 true
3
+ * @param arr
4
+ * @param func
5
+ */
6
+ declare const some: <T>(arr: T[], func: (v: T, idx?: number) => any) => boolean;
7
+ export default some;
@@ -0,0 +1,7 @@
1
+ export interface ObjectType<T> {
2
+ [key: string]: T;
3
+ }
4
+ declare function sortBy<T>(arr: ObjectType<T>[], key: Function): ObjectType<T>[];
5
+ declare function sortBy<T>(arr: ObjectType<T>[], key: string): ObjectType<T>[];
6
+ declare function sortBy<T>(arr: ObjectType<T>[], key: string[]): ObjectType<T>[];
7
+ export default sortBy;
@@ -0,0 +1,3 @@
1
+ declare function startsWith(arr: string, e: string): boolean;
2
+ declare function startsWith<T>(arr: T[], e: T): boolean;
3
+ export default startsWith;
@@ -0,0 +1,5 @@
1
+ export interface ObjectType<T> {
2
+ [key: string]: T;
3
+ }
4
+ declare function substitute<T>(str: string, o: ObjectType<T>): string;
5
+ export default substitute;
@@ -0,0 +1,6 @@
1
+ export interface OptionsType {
2
+ leading?: boolean;
3
+ trailing?: boolean;
4
+ }
5
+ declare const _default: (func: Function, wait: number, options: OptionsType) => Function;
6
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: (value: any) => any[];
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const toDegree: (radian: number) => number;
2
+ export default toDegree;
@@ -0,0 +1 @@
1
+ export default parseInt;
@@ -0,0 +1,2 @@
1
+ declare const toRadian: (degree: number) => number;
2
+ export default toRadian;
@@ -0,0 +1,2 @@
1
+ declare const _default: (value: any) => string;
2
+ export default _default;
@@ -0,0 +1,3 @@
1
+ export interface ObjectType<T> {
2
+ [key: string]: T;
3
+ }
@@ -0,0 +1,2 @@
1
+ declare const union: (...sources: any[]) => any[];
2
+ export default union;
@@ -0,0 +1 @@
1
+ export default function uniq(arr: any[], cache?: Map<any, any>): any[];
@@ -0,0 +1,2 @@
1
+ declare const _default: (prefix?: string) => string;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const upperCase: (str: string) => string;
2
+ export default upperCase;