ut2 1.7.1 → 1.8.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 (115) hide show
  1. package/README.md +138 -134
  2. package/dist/ut2.js +121 -65
  3. package/dist/ut2.js.map +1 -1
  4. package/dist/ut2.min.js +1 -1
  5. package/dist/ut2.min.js.map +1 -1
  6. package/es/clamp.js +4 -3
  7. package/es/conforms.js +4 -3
  8. package/es/conformsTo.js +4 -3
  9. package/es/countBy.js +4 -3
  10. package/es/curry.js +32 -0
  11. package/es/defaultTo.js +4 -3
  12. package/es/every.js +4 -3
  13. package/es/filter.js +4 -3
  14. package/es/find.js +4 -3
  15. package/es/fromPairs.js +4 -3
  16. package/es/groupBy.js +4 -3
  17. package/es/index.js +4 -0
  18. package/es/internals/baseDebounce.js +2 -8
  19. package/es/internals/createForEach.js +2 -2
  20. package/es/internals/createReduce.js +2 -2
  21. package/es/internals/helpers.js +3 -2
  22. package/es/internals/native.js +2 -1
  23. package/es/invert.js +22 -0
  24. package/es/isBigInt.js +8 -0
  25. package/es/keyBy.js +4 -3
  26. package/es/map.js +4 -3
  27. package/es/omit.js +4 -3
  28. package/es/orderBy.js +4 -3
  29. package/es/partial.js +16 -11
  30. package/es/partition.js +4 -3
  31. package/es/pascalCase.js +11 -0
  32. package/es/pick.js +4 -3
  33. package/es/range.js +4 -3
  34. package/es/some.js +4 -3
  35. package/es/times.js +4 -3
  36. package/lib/clamp.js +4 -3
  37. package/lib/conforms.js +4 -3
  38. package/lib/conformsTo.js +4 -3
  39. package/lib/countBy.js +4 -3
  40. package/lib/curry.js +34 -0
  41. package/lib/defaultTo.js +4 -3
  42. package/lib/every.js +4 -3
  43. package/lib/filter.js +4 -3
  44. package/lib/find.js +4 -3
  45. package/lib/fromPairs.js +4 -3
  46. package/lib/groupBy.js +4 -3
  47. package/lib/index.js +12 -4
  48. package/lib/internals/baseDebounce.js +2 -8
  49. package/lib/internals/createForEach.js +2 -2
  50. package/lib/internals/createReduce.js +2 -2
  51. package/lib/internals/helpers.js +2 -1
  52. package/lib/internals/native.js +1 -0
  53. package/lib/invert.js +24 -0
  54. package/lib/isBigInt.js +10 -0
  55. package/lib/keyBy.js +4 -3
  56. package/lib/map.js +4 -3
  57. package/lib/omit.js +4 -3
  58. package/lib/orderBy.js +4 -3
  59. package/lib/partial.js +16 -11
  60. package/lib/partition.js +4 -3
  61. package/lib/pascalCase.js +13 -0
  62. package/lib/pick.js +4 -3
  63. package/lib/range.js +4 -3
  64. package/lib/some.js +4 -3
  65. package/lib/times.js +4 -3
  66. package/package.json +26 -24
  67. package/types/after.d.ts +2 -1
  68. package/types/allKeys.d.ts +1 -1
  69. package/types/allKeysIn.d.ts +1 -1
  70. package/types/before.d.ts +2 -1
  71. package/types/clamp.d.ts +29 -2
  72. package/types/conforms.d.ts +7 -2
  73. package/types/conformsTo.d.ts +24 -3
  74. package/types/countBy.d.ts +28 -2
  75. package/types/curry.d.ts +123 -0
  76. package/types/debounce.d.ts +2 -1
  77. package/types/defaultTo.d.ts +6 -3
  78. package/types/delay.d.ts +2 -1
  79. package/types/every.d.ts +28 -4
  80. package/types/filter.d.ts +26 -4
  81. package/types/find.d.ts +26 -4
  82. package/types/forEach.d.ts +1 -6
  83. package/types/forEachRight.d.ts +1 -6
  84. package/types/fromPairs.d.ts +20 -2
  85. package/types/groupBy.d.ts +28 -2
  86. package/types/index.d.ts +4 -0
  87. package/types/internals/baseDebounce.d.ts +2 -1
  88. package/types/internals/createForEach.d.ts +7 -6
  89. package/types/internals/createReduce.d.ts +11 -10
  90. package/types/internals/helpers.d.ts +1 -0
  91. package/types/internals/native.d.ts +1 -0
  92. package/types/internals/types.d.ts +3 -0
  93. package/types/invert.d.ts +19 -0
  94. package/types/isBigInt.d.ts +22 -0
  95. package/types/isFunction.d.ts +2 -1
  96. package/types/keyBy.d.ts +28 -2
  97. package/types/keys.d.ts +1 -1
  98. package/types/keysIn.d.ts +1 -1
  99. package/types/map.d.ts +28 -4
  100. package/types/negate.d.ts +2 -1
  101. package/types/omit.d.ts +6 -1
  102. package/types/omitBy.d.ts +3 -2
  103. package/types/once.d.ts +2 -1
  104. package/types/orderBy.d.ts +43 -2
  105. package/types/partial.d.ts +63 -11
  106. package/types/partition.d.ts +38 -2
  107. package/types/pascalCase.d.ts +27 -0
  108. package/types/pick.d.ts +6 -1
  109. package/types/pickBy.d.ts +3 -2
  110. package/types/range.d.ts +28 -3
  111. package/types/reduce.d.ts +1 -10
  112. package/types/reduceRight.d.ts +1 -10
  113. package/types/some.d.ts +26 -4
  114. package/types/throttle.d.ts +2 -1
  115. package/types/times.d.ts +25 -2
package/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  **与其他工具库对比([`lodash`]、[`underscore`])**
10
10
 
11
- - 基于 ES2015+ 标准,无需原生支持的方法(`forEach`、`filter`、`Object.keys`、`Object.entries` ……)。
11
+ - 大部分是基于 ES2015+ 标准实现的纯函数,没有过多的包装嵌套。
12
12
  - 使用 TypeScript 实现,提供类型定义。
13
13
  - 导出 `es`、`cjs`、`umd` 模块格式,支持不同开发环境使用。
14
14
 
@@ -60,139 +60,143 @@ const debounced = debounce(() => {
60
60
  >
61
61
  > `import { throttle, chunk, max } from 'ut2'`
62
62
 
63
- - Array 数组
64
- - chunk - 拆分成多个 `size` 长度的区块。
65
- - compact - 剔除假值元素。
66
- - difference - 排除部分值。
67
- - formPairs - 将键值对转为对象。
68
- - intersection - 交集去重。
69
- - nth - 获取第 `n` 个元素。
70
- - shuffle - 打乱数组。
71
- - union - 并集去重。
72
- - uniq - 数组去重。
73
- - unzip - 数组分组。
74
- - xor - 先并集再排除交集部分。
75
- - zip - 数组参数分组。
76
- - Collection 集合
77
- - countBy - 统计数量。
78
- - every - 检查集合元素都为真值。
79
- - find - 查找集合元素。
80
- - filter - 过滤集合元素。
81
- - forEach - 迭代集合元素。
82
- - forEachRight - 迭代集合元素(从右往左的顺序)。
83
- - groupBy - 对象分组。
84
- - keyBy - 转为对象。
85
- - map - 迭代集合元素生成新数组。
86
- - orderBy - 排序。
87
- - partition - 拆分真值和假值。
88
- - reduce - 累计值(从右往左的顺序)。
89
- - reduceRight - 累计值。
90
- - some - 检查集合元素包含真值。
91
- - Function 函数
92
- - after - 调用 `n` 或更多次之后触发。
93
- - before - 调用次数少于 `n` 次之前触发。
94
- - debounce - 防抖函数。
95
- - delay - 延迟触发。
96
- - negate - 否定断言。
97
- - once - 只执行一次。
98
- - partial - 预设部分参数。
99
- - throttle - 节流函数。
100
- - Language 语言
101
- - isArguments - `arguments` 对象。
102
- - isArray - `Array` 对象。
103
- - isArrayBuffer - `ArrayBuffer` 对象。
104
- - isArrayLike - 类数组。
105
- - isArrayLikeObject - 类数组对象。
106
- - isBlob - `Blob` 对象。
107
- - isBoolean - 布尔类型或对象。
108
- - isBuffer - `Buffer` 对象。
109
- - isDataView - `DataView` 对象。
110
- - isDate - `Date` 对象。
111
- - isElement - `Dom` 元素。
112
- - isEqual - 深比较。
113
- - isEmpty - 空对象、数组、`Map`、`Set`。
114
- - isError - `Error` 对象。
115
- - isFinite - 有限数字。
116
- - isFunction - `Function` 对象。
117
- - isInteger - 整数。
118
- - isLength - 有效的类数组长度。
119
- - isMap - `Map` 对象。
120
- - isMatch - 普通对象部分匹配的深比较。
121
- - isNaN - `NaN`
122
- - isNil - `undefined` 或 `null` 。
123
- - isNull - `null` 。
124
- - isNumber - 数字类型或对象。
125
- - isObject - 对象。
126
- - isObjectLike - 类对象。
127
- - isPlainObject - 普通对象。
128
- - isPromiseLike - 类 `Promise` 对象。
129
- - isRegExp - `RegExp` 对象。
130
- - isSafeInteger - 安全整数。
131
- - isSet - `Set` 对象。
132
- - isString - 字符串类型或对象。
133
- - isSymbol - `Symbol` 类型或对象。
134
- - isTypedArray - 类型化数组。
135
- - isUndefined - `undefined`
136
- - isWeakMap - `WeakMap` 对象。
137
- - isWeakSet - `WeakSet` 对象。
138
- - Math 数学
139
- - ceil - 向上舍入。
140
- - floor - 向下舍入。
141
- - max - 取最大值。
142
- - min - 取最小值。
143
- - round - 四舍五入。
144
- - Number 数字
145
- - clamp - 限制数字范围。
146
- - inRange - 是否在范围内。
147
- - random - 随机小数。
148
- - randomInt - 随机整数。
149
- - Object 对象
150
- - allKeys - 对象自身的可枚举属性(包含 `Symbol` 属性)。
151
- - allKeysIn - 对象自身及继承的可枚举属性(包含 `Symbol` 属性)。
152
- - keys - 对象自身的可枚举属性(不包含 `Symbol` 属性)。
153
- - keysIn - 对象自身及继承的可枚举属性(不包含 `Symbol` 属性)。
154
- - merge - 递归对象或数组进行合并。
155
- - omit - 排除部分属性。
156
- - omitBy - 根据方法,排除部分属性。
157
- - pick - 选择部分属性。
158
- - pickBy - 根据方法,选择部分属性。
159
- - String 字符串
160
- - camelCase - 驼峰小写。
161
- - capitalize - 首字母大写,其余小写。
162
- - escape - 转义 `&` `<` `>` `"` `'` 为 HTML 实体字符。
163
- - escapeRegExp - 转义为 `RegExp` 字符串中的特殊字符。
164
- - kebabCase - 连接符分隔小写。
165
- - lowerCase - 空格分隔小写。
166
- - lowerFirst - 首字母小写。
167
- - snakeCase - 下划线分隔小写
168
- - unescape - 转义字符串中的 HTML 实体字符 `&amp;` `&lt;` `&quot;` `&#39;`。
169
- - upperCase - 空格分隔大写。
170
- - upperFirst - 首字母大写。
171
- - words - 拆分词组。
172
- - Util 实用工具
173
- - castArray - 包装成数组。
174
- - conforms - 创建断言对象属性的方法。
175
- - conformsTo - 断言对象属性。
176
- - constant - 返回自身的函数。
177
- - defaultTo - 默认值。
178
- - eq - 等于。
179
- - gt - 大于。
180
- - gte - 大于等于
181
- - identity - 返回第一个参数的函数。
182
- - lt - 小于。
183
- - lte - 小于等于。
184
- - noop - 空函数。
185
- - nthArg - 返回指定位置参数的函数。
186
- - range - 创建升序或降序的数字数组。
187
- - sleep - 返回 `promise` 延迟。
188
- - times - 迭代执行次数。
189
- - toFinite - 转为有限数字。
190
- - toInteger - 转为整数。
191
- - toLength - 转为数组长度整数。
192
- - toNumber - 转为数字。
193
- - toSafeInteger - 转为安全整数。
194
- - toString - 转为字符串。
195
- - uniqueId - 唯一 ID。
63
+ - [Array](https://caijf.github.io/ut2/module-Array.html) 数组
64
+ - [chunk](https://caijf.github.io/ut2/module-Array.html#.chunk) - 拆分成多个 `size` 长度的区块。
65
+ - [compact](https://caijf.github.io/ut2/module-Array.html#.compact) - 剔除假值元素。
66
+ - [difference](https://caijf.github.io/ut2/module-Array.html#.difference) - 排除部分值。
67
+ - [formPairs](https://caijf.github.io/ut2/module-Array.html#.fromPairs) - 将键值对转为对象。
68
+ - [intersection](https://caijf.github.io/ut2/module-Array.html#.intersection) - 交集去重。
69
+ - [nth](https://caijf.github.io/ut2/module-Array.html#.nth) - 获取第 `n` 个元素。
70
+ - [shuffle](https://caijf.github.io/ut2/module-Array.html#.shuffle) - 打乱数组。
71
+ - [union](https://caijf.github.io/ut2/module-Array.html#.union) - 并集去重。
72
+ - [uniq](https://caijf.github.io/ut2/module-Array.html#.uniq) - 数组去重。
73
+ - [unzip](https://caijf.github.io/ut2/module-Array.html#.unzip) - 数组分组。
74
+ - [xor](https://caijf.github.io/ut2/module-Array.html#.xor) - 先并集再排除交集部分。
75
+ - [zip](https://caijf.github.io/ut2/module-Array.html#.zip) - 数组参数分组。
76
+ - [Collection](https://caijf.github.io/ut2/module-Collection.html) 集合
77
+ - [countBy](https://caijf.github.io/ut2/module-Collection.html#.countBy) - 统计数量。
78
+ - [every](https://caijf.github.io/ut2/module-Collection.html#.every) - 检查集合元素都为真值。
79
+ - [filter](https://caijf.github.io/ut2/module-Collection.html#.filter) - 过滤集合元素。
80
+ - [find](https://caijf.github.io/ut2/module-Collection.html#.find) - 查找集合元素。
81
+ - [forEach](https://caijf.github.io/ut2/module-Collection.html#.forEach) - 迭代集合元素。
82
+ - [forEachRight](https://caijf.github.io/ut2/module-Collection.html#.forEachRight) - 迭代集合元素(从右往左的顺序)。
83
+ - [groupBy](https://caijf.github.io/ut2/module-Collection.html#.groupBy) - 对象分组。
84
+ - [keyBy](https://caijf.github.io/ut2/module-Collection.html#.keyBy) - 转为对象。
85
+ - [map](https://caijf.github.io/ut2/module-Collection.html#.map) - 迭代集合元素生成新数组。
86
+ - [orderBy](https://caijf.github.io/ut2/module-Collection.html#.orderBy) - 排序。
87
+ - [partition](https://caijf.github.io/ut2/module-Collection.html#.partition) - 拆分真值和假值。
88
+ - [reduce](https://caijf.github.io/ut2/module-Collection.html#.reduce) - 累计值。
89
+ - [reduceRight](https://caijf.github.io/ut2/module-Collection.html#.reduceRight) - 累计值(从右往左的顺序)。
90
+ - [some](https://caijf.github.io/ut2/module-Collection.html#.some) - 检查集合元素包含真值。
91
+ - [Function](https://caijf.github.io/ut2/module-Function.html) 函数
92
+ - [after](https://caijf.github.io/ut2/module-Function.html#.after) - 调用 `n` 或更多次之后触发。
93
+ - [before](https://caijf.github.io/ut2/module-Function.html#.before) - 调用次数少于 `n` 次之前触发。
94
+ - [curry](https://caijf.github.io/ut2/module-Function.html#.curry) - 柯里化函数。
95
+ - [debounce](https://caijf.github.io/ut2/module-Function.html#.debounce) - 防抖函数。
96
+ - [delay](https://caijf.github.io/ut2/module-Function.html#.delay) - 延迟触发。
97
+ - [negate](https://caijf.github.io/ut2/module-Function.html#.negate) - 否定断言。
98
+ - [once](https://caijf.github.io/ut2/module-Function.html#.once) - 只执行一次。
99
+ - [partial](https://caijf.github.io/ut2/module-Function.html#.partial) - 预设部分参数。
100
+ - [throttle](https://caijf.github.io/ut2/module-Function.html#.throttle) - 节流函数。
101
+ - [Language](https://caijf.github.io/ut2/module-Language.html) 语言
102
+ - [isArguments](https://caijf.github.io/ut2/module-Language.html#.isArguments) - `arguments` 对象。
103
+ - [isArray](https://caijf.github.io/ut2/module-Language.html#.isArray) - `Array` 对象。
104
+ - [isArrayBuffer](https://caijf.github.io/ut2/module-Language.html#.isArrayBuffer) - `ArrayBuffer` 对象。
105
+ - [isArrayLike](https://caijf.github.io/ut2/module-Language.html#.isArrayLike) - 类数组。
106
+ - [isArrayLikeObject](https://caijf.github.io/ut2/module-Language.html#.isArrayLikeObject) - 类数组对象。
107
+ - [isBigInt](https://caijf.github.io/ut2/module-Language.html#.isBigInt) - `bigint` 类型或对象。
108
+ - [isBlob](https://caijf.github.io/ut2/module-Language.html#.isBlob) - `Blob` 对象。
109
+ - [isBoolean](https://caijf.github.io/ut2/module-Language.html#.isBoolean) - 布尔类型或对象。
110
+ - [isBuffer](https://caijf.github.io/ut2/module-Language.html#.isBuffer) - `Buffer` 对象。
111
+ - [isDataView](https://caijf.github.io/ut2/module-Language.html#.isDataView) - `DataView` 对象。
112
+ - [isDate](https://caijf.github.io/ut2/module-Language.html#.isDate) - `Date` 对象。
113
+ - [isElement](https://caijf.github.io/ut2/module-Language.html#.isElement) - `Dom` 元素。
114
+ - [isEmpty](https://caijf.github.io/ut2/module-Language.html#.isEmpty) - 空对象、数组、`Map`、`Set`。
115
+ - [isEqual](https://caijf.github.io/ut2/module-Language.html#.isEqual) - 深比较。
116
+ - [isError](https://caijf.github.io/ut2/module-Language.html#.isError) - `Error` 对象。
117
+ - [isFinite](https://caijf.github.io/ut2/module-Language.html#.isFinite) - 有限数字。
118
+ - [isFunction](https://caijf.github.io/ut2/module-Language.html#.isFunction) - `Function` 对象。
119
+ - [isInteger](https://caijf.github.io/ut2/module-Language.html#.isInteger) - 整数。
120
+ - [isLength](https://caijf.github.io/ut2/module-Language.html#.isLength) - 有效的类数组长度。
121
+ - [isMap](https://caijf.github.io/ut2/module-Language.html#.isMap) - `Map` 对象。
122
+ - [isMatch](https://caijf.github.io/ut2/module-Language.html#.isMatch) - 普通对象部分匹配的深比较。
123
+ - [isNaN](https://caijf.github.io/ut2/module-Language.html#.isNaN) - `NaN` 。
124
+ - [isNil](https://caijf.github.io/ut2/module-Language.html#.isNil) - `undefined` 或 `null` 。
125
+ - [isNull](https://caijf.github.io/ut2/module-Language.html#.isNull) - `null` 。
126
+ - [isNumber](https://caijf.github.io/ut2/module-Language.html#.isNumber) - 数字类型或对象。
127
+ - [isObject](https://caijf.github.io/ut2/module-Language.html#.isObject) - 对象。
128
+ - [isObjectLike](https://caijf.github.io/ut2/module-Language.html#.isObjectLike) - 类对象。
129
+ - [isPlainObject](https://caijf.github.io/ut2/module-Language.html#.isPlainObject) - 普通对象。
130
+ - [isPromiseLike](https://caijf.github.io/ut2/module-Language.html#.isPromiseLike) - 类 `Promise` 对象。
131
+ - [isRegExp](https://caijf.github.io/ut2/module-Language.html#.isRegExp) - `RegExp` 对象。
132
+ - [isSafeInteger](https://caijf.github.io/ut2/module-Language.html#.isSafeInteger) - 安全整数。
133
+ - [isSet](https://caijf.github.io/ut2/module-Language.html#.isSet) - `Set` 对象。
134
+ - [isString](https://caijf.github.io/ut2/module-Language.html#.isString) - 字符串类型或对象。
135
+ - [isSymbol](https://caijf.github.io/ut2/module-Language.html#.isSymbol) - `Symbol` 类型或对象。
136
+ - [isTypedArray](https://caijf.github.io/ut2/module-Language.html#.isTypedArray) - 类型化数组。
137
+ - [isUndefined](https://caijf.github.io/ut2/module-Language.html#.isUndefined) - `undefined`
138
+ - [isWeakMap](https://caijf.github.io/ut2/module-Language.html#.isWeakMap) - `WeakMap` 对象。
139
+ - [isWeakSet](https://caijf.github.io/ut2/module-Language.html#.isWeakSet) - `WeakSet` 对象。
140
+ - [Math](https://caijf.github.io/ut2/module-Math.html) 数学
141
+ - [ceil](https://caijf.github.io/ut2/module-Math.html#.ceil) - 向上舍入。
142
+ - [floor](https://caijf.github.io/ut2/module-Math.html#.floor) - 向下舍入。
143
+ - [max](https://caijf.github.io/ut2/module-Math.html#.max) - 取最大值。
144
+ - [min](https://caijf.github.io/ut2/module-Math.html#.min) - 取最小值。
145
+ - [round](https://caijf.github.io/ut2/module-Math.html#.round) - 四舍五入。
146
+ - [Number](https://caijf.github.io/ut2/module-Number.html) 数字
147
+ - [clamp](https://caijf.github.io/ut2/module-Number.html#.clamp) - 限制数字范围。
148
+ - [inRange](https://caijf.github.io/ut2/module-Number.html#.inRange) - 是否在范围内。
149
+ - [random](https://caijf.github.io/ut2/module-Number.html#.random) - 随机小数。
150
+ - [randomInt](https://caijf.github.io/ut2/module-Number.html#.randomInt) - 随机整数。
151
+ - [Object](https://caijf.github.io/ut2/module-Object.html) 对象
152
+ - [allKeys](https://caijf.github.io/ut2/module-Object.html#.allKeys) - 对象自身的可枚举属性(包含 `Symbol` 属性)。
153
+ - [allKeysIn](https://caijf.github.io/ut2/module-Object.html#.allKeysIn) - 对象自身及继承的可枚举属性(包含 `Symbol` 属性)。
154
+ - [invert](https://caijf.github.io/ut2/module-Object.html#.invert) - 对象自身的可枚举属性(不包含 `Symbol` 属性)和值反转。
155
+ - [keys](https://caijf.github.io/ut2/module-Object.html#.keys) - 对象自身的可枚举属性(不包含 `Symbol` 属性)。
156
+ - [keysIn](https://caijf.github.io/ut2/module-Object.html#.keysIn) - 对象自身及继承的可枚举属性(不包含 `Symbol` 属性)。
157
+ - [merge](https://caijf.github.io/ut2/module-Object.html#.merge) - 递归对象或数组进行合并。
158
+ - [omit](https://caijf.github.io/ut2/module-Object.html#.omit) - 排除部分属性。
159
+ - [omitBy](https://caijf.github.io/ut2/module-Object.html#.omitBy) - 根据方法,排除部分属性。
160
+ - [pick](https://caijf.github.io/ut2/module-Object.html#.pick) - 选择部分属性。
161
+ - [pickBy](https://caijf.github.io/ut2/module-Object.html#.pickBy) - 根据方法,选择部分属性。
162
+ - [String](https://caijf.github.io/ut2/module-String.html) 字符串
163
+ - [camelCase](https://caijf.github.io/ut2/module-String.html#.camelCase) - 驼峰小写。
164
+ - [capitalize](https://caijf.github.io/ut2/module-String.html#.capitalize) - 首字母大写,其余小写。
165
+ - [escape](https://caijf.github.io/ut2/module-String.html#.escape) - 转义 `&` `<` `>` `"` `'` 为 HTML 实体字符。
166
+ - [escapeRegExp](https://caijf.github.io/ut2/module-String.html#.escapeRegExp) - 转义为 `RegExp` 字符串中的特殊字符。
167
+ - [kebabCase](https://caijf.github.io/ut2/module-String.html#.kebabCase) - 连接符分隔小写。
168
+ - [lowerCase](https://caijf.github.io/ut2/module-String.html#.lowerCase) - 空格分隔小写。
169
+ - [lowerFirst](https://caijf.github.io/ut2/module-String.html#.lowerFirst) - 首字母小写。
170
+ - [pascalCase](https://caijf.github.io/ut2/module-String.html#.pascalCase) - 帕斯卡小写。又名大驼峰。
171
+ - [snakeCase](https://caijf.github.io/ut2/module-String.html#.snakeCase) - 下划线分隔小写。
172
+ - [unescape](https://caijf.github.io/ut2/module-String.html#.unescape) - 转义字符串中的 HTML 实体字符 `&amp;` `&lt;` `&quot;` `&#39;`。
173
+ - [upperCase](https://caijf.github.io/ut2/module-String.html#.upperCase) - 空格分隔大写。
174
+ - [upperFirst](https://caijf.github.io/ut2/module-String.html#.upperFirst) - 首字母大写。
175
+ - [words](https://caijf.github.io/ut2/module-String.html#.words) - 拆分词组。
176
+ - [Util](https://caijf.github.io/ut2/module-Util.html) 实用工具
177
+ - [castArray](https://caijf.github.io/ut2/module-Util.html#.castArray) - 包装成数组。
178
+ - [conforms](https://caijf.github.io/ut2/module-Util.html#.conforms) - 创建断言对象属性的方法。
179
+ - [conformsTo](https://caijf.github.io/ut2/module-Util.html#.conformsTo) - 断言对象属性。
180
+ - [constant](https://caijf.github.io/ut2/module-Util.html#.constant) - 返回自身的函数。
181
+ - [defaultTo](https://caijf.github.io/ut2/module-Util.html#.defaultTo) - 默认值。
182
+ - [eq](https://caijf.github.io/ut2/module-Util.html#.eq) - 等于。
183
+ - [gt](https://caijf.github.io/ut2/module-Util.html#.gt) - 大于。
184
+ - [gte](https://caijf.github.io/ut2/module-Util.html#.gte) - 大于等于
185
+ - [identity](https://caijf.github.io/ut2/module-Util.html#.identity) - 返回第一个参数的函数。
186
+ - [lt](https://caijf.github.io/ut2/module-Util.html#.lt) - 小于。
187
+ - [lte](https://caijf.github.io/ut2/module-Util.html#.lte) - 小于等于。
188
+ - [noop](https://caijf.github.io/ut2/module-Util.html#.noop) - 空函数。
189
+ - [nthArg](https://caijf.github.io/ut2/module-Util.html#.nthArg) - 返回指定位置参数的函数。
190
+ - [range](https://caijf.github.io/ut2/module-Util.html#.range) - 创建升序或降序的数字数组。
191
+ - [sleep](https://caijf.github.io/ut2/module-Util.html#.sleep) - 返回 `promise` 延迟。
192
+ - [times](https://caijf.github.io/ut2/module-Util.html#.times) - 迭代执行次数。
193
+ - [toFinite](https://caijf.github.io/ut2/module-Util.html#.toFinite) - 转为有限数字。
194
+ - [toInteger](https://caijf.github.io/ut2/module-Util.html#.toInteger) - 转为整数。
195
+ - [toLength](https://caijf.github.io/ut2/module-Util.html#.toLength) - 转为数组长度整数。
196
+ - [toNumber](https://caijf.github.io/ut2/module-Util.html#.toNumber) - 转为数字。
197
+ - [toSafeInteger](https://caijf.github.io/ut2/module-Util.html#.toSafeInteger) - 转为安全整数。
198
+ - [toString](https://caijf.github.io/ut2/module-Util.html#.toString) - 转为字符串。
199
+ - [uniqueId](https://caijf.github.io/ut2/module-Util.html#.uniqueId) - 唯一 ID。
196
200
 
197
201
  [npm]: https://img.shields.io/npm/v/ut2.svg
198
202
  [npm-url]: https://npmjs.com/package/ut2