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.
- package/README.md +138 -134
- package/dist/ut2.js +121 -65
- package/dist/ut2.js.map +1 -1
- package/dist/ut2.min.js +1 -1
- package/dist/ut2.min.js.map +1 -1
- package/es/clamp.js +4 -3
- package/es/conforms.js +4 -3
- package/es/conformsTo.js +4 -3
- package/es/countBy.js +4 -3
- package/es/curry.js +32 -0
- package/es/defaultTo.js +4 -3
- package/es/every.js +4 -3
- package/es/filter.js +4 -3
- package/es/find.js +4 -3
- package/es/fromPairs.js +4 -3
- package/es/groupBy.js +4 -3
- package/es/index.js +4 -0
- package/es/internals/baseDebounce.js +2 -8
- package/es/internals/createForEach.js +2 -2
- package/es/internals/createReduce.js +2 -2
- package/es/internals/helpers.js +3 -2
- package/es/internals/native.js +2 -1
- package/es/invert.js +22 -0
- package/es/isBigInt.js +8 -0
- package/es/keyBy.js +4 -3
- package/es/map.js +4 -3
- package/es/omit.js +4 -3
- package/es/orderBy.js +4 -3
- package/es/partial.js +16 -11
- package/es/partition.js +4 -3
- package/es/pascalCase.js +11 -0
- package/es/pick.js +4 -3
- package/es/range.js +4 -3
- package/es/some.js +4 -3
- package/es/times.js +4 -3
- package/lib/clamp.js +4 -3
- package/lib/conforms.js +4 -3
- package/lib/conformsTo.js +4 -3
- package/lib/countBy.js +4 -3
- package/lib/curry.js +34 -0
- package/lib/defaultTo.js +4 -3
- package/lib/every.js +4 -3
- package/lib/filter.js +4 -3
- package/lib/find.js +4 -3
- package/lib/fromPairs.js +4 -3
- package/lib/groupBy.js +4 -3
- package/lib/index.js +12 -4
- package/lib/internals/baseDebounce.js +2 -8
- package/lib/internals/createForEach.js +2 -2
- package/lib/internals/createReduce.js +2 -2
- package/lib/internals/helpers.js +2 -1
- package/lib/internals/native.js +1 -0
- package/lib/invert.js +24 -0
- package/lib/isBigInt.js +10 -0
- package/lib/keyBy.js +4 -3
- package/lib/map.js +4 -3
- package/lib/omit.js +4 -3
- package/lib/orderBy.js +4 -3
- package/lib/partial.js +16 -11
- package/lib/partition.js +4 -3
- package/lib/pascalCase.js +13 -0
- package/lib/pick.js +4 -3
- package/lib/range.js +4 -3
- package/lib/some.js +4 -3
- package/lib/times.js +4 -3
- package/package.json +26 -24
- package/types/after.d.ts +2 -1
- package/types/allKeys.d.ts +1 -1
- package/types/allKeysIn.d.ts +1 -1
- package/types/before.d.ts +2 -1
- package/types/clamp.d.ts +29 -2
- package/types/conforms.d.ts +7 -2
- package/types/conformsTo.d.ts +24 -3
- package/types/countBy.d.ts +28 -2
- package/types/curry.d.ts +123 -0
- package/types/debounce.d.ts +2 -1
- package/types/defaultTo.d.ts +6 -3
- package/types/delay.d.ts +2 -1
- package/types/every.d.ts +28 -4
- package/types/filter.d.ts +26 -4
- package/types/find.d.ts +26 -4
- package/types/forEach.d.ts +1 -6
- package/types/forEachRight.d.ts +1 -6
- package/types/fromPairs.d.ts +20 -2
- package/types/groupBy.d.ts +28 -2
- package/types/index.d.ts +4 -0
- package/types/internals/baseDebounce.d.ts +2 -1
- package/types/internals/createForEach.d.ts +7 -6
- package/types/internals/createReduce.d.ts +11 -10
- package/types/internals/helpers.d.ts +1 -0
- package/types/internals/native.d.ts +1 -0
- package/types/internals/types.d.ts +3 -0
- package/types/invert.d.ts +19 -0
- package/types/isBigInt.d.ts +22 -0
- package/types/isFunction.d.ts +2 -1
- package/types/keyBy.d.ts +28 -2
- package/types/keys.d.ts +1 -1
- package/types/keysIn.d.ts +1 -1
- package/types/map.d.ts +28 -4
- package/types/negate.d.ts +2 -1
- package/types/omit.d.ts +6 -1
- package/types/omitBy.d.ts +3 -2
- package/types/once.d.ts +2 -1
- package/types/orderBy.d.ts +43 -2
- package/types/partial.d.ts +63 -11
- package/types/partition.d.ts +38 -2
- package/types/pascalCase.d.ts +27 -0
- package/types/pick.d.ts +6 -1
- package/types/pickBy.d.ts +3 -2
- package/types/range.d.ts +28 -3
- package/types/reduce.d.ts +1 -10
- package/types/reduceRight.d.ts +1 -10
- package/types/some.d.ts +26 -4
- package/types/throttle.d.ts +2 -1
- package/types/times.d.ts +25 -2
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
**与其他工具库对比([`lodash`]、[`underscore`])**
|
|
10
10
|
|
|
11
|
-
-
|
|
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
|
-
-
|
|
80
|
-
-
|
|
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
|
-
-
|
|
95
|
-
-
|
|
96
|
-
-
|
|
97
|
-
-
|
|
98
|
-
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
|
|
102
|
-
-
|
|
103
|
-
-
|
|
104
|
-
-
|
|
105
|
-
-
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
-
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
-
|
|
113
|
-
-
|
|
114
|
-
-
|
|
115
|
-
-
|
|
116
|
-
-
|
|
117
|
-
-
|
|
118
|
-
-
|
|
119
|
-
-
|
|
120
|
-
-
|
|
121
|
-
-
|
|
122
|
-
-
|
|
123
|
-
-
|
|
124
|
-
-
|
|
125
|
-
-
|
|
126
|
-
-
|
|
127
|
-
-
|
|
128
|
-
-
|
|
129
|
-
-
|
|
130
|
-
-
|
|
131
|
-
-
|
|
132
|
-
-
|
|
133
|
-
-
|
|
134
|
-
-
|
|
135
|
-
-
|
|
136
|
-
-
|
|
137
|
-
-
|
|
138
|
-
-
|
|
139
|
-
-
|
|
140
|
-
|
|
141
|
-
-
|
|
142
|
-
-
|
|
143
|
-
-
|
|
144
|
-
-
|
|
145
|
-
-
|
|
146
|
-
|
|
147
|
-
-
|
|
148
|
-
-
|
|
149
|
-
-
|
|
150
|
-
-
|
|
151
|
-
|
|
152
|
-
-
|
|
153
|
-
-
|
|
154
|
-
-
|
|
155
|
-
-
|
|
156
|
-
-
|
|
157
|
-
-
|
|
158
|
-
-
|
|
159
|
-
-
|
|
160
|
-
-
|
|
161
|
-
-
|
|
162
|
-
|
|
163
|
-
-
|
|
164
|
-
-
|
|
165
|
-
-
|
|
166
|
-
-
|
|
167
|
-
-
|
|
168
|
-
-
|
|
169
|
-
-
|
|
170
|
-
-
|
|
171
|
-
-
|
|
172
|
-
-
|
|
173
|
-
-
|
|
174
|
-
-
|
|
175
|
-
-
|
|
176
|
-
|
|
177
|
-
-
|
|
178
|
-
-
|
|
179
|
-
-
|
|
180
|
-
-
|
|
181
|
-
-
|
|
182
|
-
-
|
|
183
|
-
-
|
|
184
|
-
-
|
|
185
|
-
-
|
|
186
|
-
-
|
|
187
|
-
-
|
|
188
|
-
-
|
|
189
|
-
-
|
|
190
|
-
-
|
|
191
|
-
-
|
|
192
|
-
-
|
|
193
|
-
-
|
|
194
|
-
-
|
|
195
|
-
-
|
|
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 实体字符 `&` `<` `"` `'`。
|
|
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
|