@jswork/utils 1.0.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 +7 -0
- package/dist/index.cjs +745 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/toolkit/array.cjs +268 -0
- package/dist/toolkit/array.cjs.map +1 -0
- package/dist/toolkit/array.d.cts +10 -0
- package/dist/toolkit/array.d.ts +10 -0
- package/dist/toolkit/array.js +3 -0
- package/dist/toolkit/array.js.map +1 -0
- package/dist/toolkit/compat.cjs +16 -0
- package/dist/toolkit/compat.cjs.map +1 -0
- package/dist/toolkit/compat.d.cts +1 -0
- package/dist/toolkit/compat.d.ts +1 -0
- package/dist/toolkit/compat.js +3 -0
- package/dist/toolkit/compat.js.map +1 -0
- package/dist/toolkit/function.cjs +92 -0
- package/dist/toolkit/function.cjs.map +1 -0
- package/dist/toolkit/function.d.cts +1 -0
- package/dist/toolkit/function.d.ts +1 -0
- package/dist/toolkit/function.js +3 -0
- package/dist/toolkit/function.js.map +1 -0
- package/dist/toolkit/math.cjs +60 -0
- package/dist/toolkit/math.cjs.map +1 -0
- package/dist/toolkit/math.d.cts +1 -0
- package/dist/toolkit/math.d.ts +1 -0
- package/dist/toolkit/math.js +3 -0
- package/dist/toolkit/math.js.map +1 -0
- package/dist/toolkit/object.cjs +76 -0
- package/dist/toolkit/object.cjs.map +1 -0
- package/dist/toolkit/object.d.cts +1 -0
- package/dist/toolkit/object.d.ts +1 -0
- package/dist/toolkit/object.js +3 -0
- package/dist/toolkit/object.js.map +1 -0
- package/dist/toolkit/predicate.cjs +136 -0
- package/dist/toolkit/predicate.cjs.map +1 -0
- package/dist/toolkit/predicate.d.cts +1 -0
- package/dist/toolkit/predicate.d.ts +1 -0
- package/dist/toolkit/predicate.js +3 -0
- package/dist/toolkit/predicate.js.map +1 -0
- package/dist/toolkit/promise.cjs +28 -0
- package/dist/toolkit/promise.cjs.map +1 -0
- package/dist/toolkit/promise.d.cts +1 -0
- package/dist/toolkit/promise.d.ts +1 -0
- package/dist/toolkit/promise.js +3 -0
- package/dist/toolkit/promise.js.map +1 -0
- package/dist/toolkit/string.cjs +92 -0
- package/dist/toolkit/string.cjs.map +1 -0
- package/dist/toolkit/string.d.cts +1 -0
- package/dist/toolkit/string.d.ts +1 -0
- package/dist/toolkit/string.js +3 -0
- package/dist/toolkit/string.js.map +1 -0
- package/dist/toolkit/util.cjs +24 -0
- package/dist/toolkit/util.cjs.map +1 -0
- package/dist/toolkit/util.d.cts +1 -0
- package/dist/toolkit/util.d.ts +1 -0
- package/dist/toolkit/util.js +3 -0
- package/dist/toolkit/util.js.map +1 -0
- package/package.json +37 -0
- package/src/index.ts +12 -0
- package/src/toolkit/array.ts +67 -0
- package/src/toolkit/compat.ts +300 -0
- package/src/toolkit/error.ts +4 -0
- package/src/toolkit/function.ts +23 -0
- package/src/toolkit/math.ts +15 -0
- package/src/toolkit/object.ts +19 -0
- package/src/toolkit/predicate.ts +34 -0
- package/src/toolkit/promise.ts +7 -0
- package/src/toolkit/string.ts +23 -0
- package/src/toolkit/util.ts +6 -0
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
export {
|
|
2
|
+
// add,
|
|
3
|
+
// after,
|
|
4
|
+
// ary,
|
|
5
|
+
// assign,
|
|
6
|
+
// assignIn,
|
|
7
|
+
// assignInWith,
|
|
8
|
+
// assignWith,
|
|
9
|
+
// at,
|
|
10
|
+
// attempt,
|
|
11
|
+
// before,
|
|
12
|
+
// bind,
|
|
13
|
+
// bindAll,
|
|
14
|
+
// bindKey,
|
|
15
|
+
// camelCase,
|
|
16
|
+
// capitalize,
|
|
17
|
+
// castArray,
|
|
18
|
+
// ceil,
|
|
19
|
+
// chunk,
|
|
20
|
+
// clamp,
|
|
21
|
+
// clone,
|
|
22
|
+
// cloneDeep,
|
|
23
|
+
// cloneDeepWith,
|
|
24
|
+
// cloneWith,
|
|
25
|
+
// compact,
|
|
26
|
+
// concat,
|
|
27
|
+
// cond,
|
|
28
|
+
// conforms,
|
|
29
|
+
// conformsTo,
|
|
30
|
+
// constant,
|
|
31
|
+
// countBy,
|
|
32
|
+
// create,
|
|
33
|
+
// curry,
|
|
34
|
+
// curryRight,
|
|
35
|
+
// debounce,
|
|
36
|
+
// deburr,
|
|
37
|
+
// default,
|
|
38
|
+
// defaultTo,
|
|
39
|
+
// defaults,
|
|
40
|
+
// defaultsDeep,
|
|
41
|
+
// defer,
|
|
42
|
+
// delay,
|
|
43
|
+
// difference,
|
|
44
|
+
// differenceBy,
|
|
45
|
+
// differenceWith,
|
|
46
|
+
// divide,
|
|
47
|
+
// drop,
|
|
48
|
+
// dropRight,
|
|
49
|
+
// dropRightWhile,
|
|
50
|
+
// dropWhile,
|
|
51
|
+
// each,
|
|
52
|
+
// eachRight,
|
|
53
|
+
// endsWith,
|
|
54
|
+
// eq,
|
|
55
|
+
// escape,
|
|
56
|
+
// escapeRegExp,
|
|
57
|
+
// every,
|
|
58
|
+
// extend,
|
|
59
|
+
// extendWith,
|
|
60
|
+
// fill,
|
|
61
|
+
// filter,
|
|
62
|
+
// find,
|
|
63
|
+
// findIndex,
|
|
64
|
+
// findKey,
|
|
65
|
+
// findLast,
|
|
66
|
+
// findLastIndex,
|
|
67
|
+
// findLastKey,
|
|
68
|
+
// first,
|
|
69
|
+
// flatMap,
|
|
70
|
+
// flatMapDeep,
|
|
71
|
+
// flatMapDepth,
|
|
72
|
+
// flatten,
|
|
73
|
+
// flattenDeep,
|
|
74
|
+
// flattenDepth,
|
|
75
|
+
// flip,
|
|
76
|
+
// floor,
|
|
77
|
+
// flow,
|
|
78
|
+
// flowRight,
|
|
79
|
+
// forEach,
|
|
80
|
+
// forEachRight,
|
|
81
|
+
// forIn,
|
|
82
|
+
// forInRight,
|
|
83
|
+
// forOwn,
|
|
84
|
+
// forOwnRight,
|
|
85
|
+
// fromPairs,
|
|
86
|
+
// functions,
|
|
87
|
+
// functionsIn,
|
|
88
|
+
get,
|
|
89
|
+
// groupBy,
|
|
90
|
+
// gt,
|
|
91
|
+
// gte,
|
|
92
|
+
// has,
|
|
93
|
+
// hasIn,
|
|
94
|
+
// head,
|
|
95
|
+
// identity,
|
|
96
|
+
// inRange,
|
|
97
|
+
// includes,
|
|
98
|
+
// indexOf,
|
|
99
|
+
// initial,
|
|
100
|
+
// intersection,
|
|
101
|
+
// intersectionBy,
|
|
102
|
+
// intersectionWith,
|
|
103
|
+
// invert,
|
|
104
|
+
// invertBy,
|
|
105
|
+
// invoke,
|
|
106
|
+
// invokeMap,
|
|
107
|
+
// isArguments,
|
|
108
|
+
// isArray,
|
|
109
|
+
// isArrayBuffer,
|
|
110
|
+
// isArrayLike,
|
|
111
|
+
// isArrayLikeObject,
|
|
112
|
+
// isBoolean,
|
|
113
|
+
// isBuffer,
|
|
114
|
+
// isDate,
|
|
115
|
+
// isElement,
|
|
116
|
+
// isEmpty,
|
|
117
|
+
// isEqual,
|
|
118
|
+
// isEqualWith,
|
|
119
|
+
// isError,
|
|
120
|
+
// isFinite,
|
|
121
|
+
// isFunction,
|
|
122
|
+
// isInteger,
|
|
123
|
+
// isLength,
|
|
124
|
+
// isMap,
|
|
125
|
+
// isMatch,
|
|
126
|
+
// isMatchWith,
|
|
127
|
+
// isNaN,
|
|
128
|
+
// isNative,
|
|
129
|
+
// isNil,
|
|
130
|
+
// isNull,
|
|
131
|
+
// isNumber,
|
|
132
|
+
// isObject,
|
|
133
|
+
// isObjectLike,
|
|
134
|
+
// isPlainObject,
|
|
135
|
+
// isRegExp,
|
|
136
|
+
// isSafeInteger,
|
|
137
|
+
// isSet,
|
|
138
|
+
// isString,
|
|
139
|
+
// isSymbol,
|
|
140
|
+
// isTypedArray,
|
|
141
|
+
// isUndefined,
|
|
142
|
+
// isWeakMap,
|
|
143
|
+
// isWeakSet,
|
|
144
|
+
// iteratee,
|
|
145
|
+
// join,
|
|
146
|
+
// kebabCase,
|
|
147
|
+
// keyBy,
|
|
148
|
+
// keys,
|
|
149
|
+
// keysIn,
|
|
150
|
+
// last,
|
|
151
|
+
// lastIndexOf,
|
|
152
|
+
// lowerCase,
|
|
153
|
+
// lowerFirst,
|
|
154
|
+
// lt,
|
|
155
|
+
// lte,
|
|
156
|
+
// map,
|
|
157
|
+
// mapKeys,
|
|
158
|
+
// mapValues,
|
|
159
|
+
// matches,
|
|
160
|
+
// matchesProperty,
|
|
161
|
+
// max,
|
|
162
|
+
// maxBy,
|
|
163
|
+
// mean,
|
|
164
|
+
// meanBy,
|
|
165
|
+
// memoize,
|
|
166
|
+
// merge,
|
|
167
|
+
// mergeWith,
|
|
168
|
+
// method,
|
|
169
|
+
// methodOf,
|
|
170
|
+
// min,
|
|
171
|
+
// minBy,
|
|
172
|
+
// multiply,
|
|
173
|
+
// negate,
|
|
174
|
+
// noop,
|
|
175
|
+
// now,
|
|
176
|
+
// nth,
|
|
177
|
+
// nthArg,
|
|
178
|
+
// omit,
|
|
179
|
+
// omitBy,
|
|
180
|
+
// once,
|
|
181
|
+
// orderBy,
|
|
182
|
+
// over,
|
|
183
|
+
// overArgs,
|
|
184
|
+
// overEvery,
|
|
185
|
+
// overSome,
|
|
186
|
+
// pad,
|
|
187
|
+
// padEnd,
|
|
188
|
+
// padStart,
|
|
189
|
+
// parseInt,
|
|
190
|
+
// partial,
|
|
191
|
+
// partialRight,
|
|
192
|
+
// partition,
|
|
193
|
+
// pick,
|
|
194
|
+
// pickBy,
|
|
195
|
+
// property,
|
|
196
|
+
// propertyOf,
|
|
197
|
+
// pull,
|
|
198
|
+
// pullAll,
|
|
199
|
+
// pullAllBy,
|
|
200
|
+
// pullAllWith,
|
|
201
|
+
// pullAt,
|
|
202
|
+
// random,
|
|
203
|
+
// range,
|
|
204
|
+
// rangeRight,
|
|
205
|
+
// rearg,
|
|
206
|
+
// reduce,
|
|
207
|
+
// reduceRight,
|
|
208
|
+
// reject,
|
|
209
|
+
// remove,
|
|
210
|
+
// repeat,
|
|
211
|
+
// replace,
|
|
212
|
+
// rest,
|
|
213
|
+
// result,
|
|
214
|
+
// reverse,
|
|
215
|
+
// round,
|
|
216
|
+
// sample,
|
|
217
|
+
// sampleSize,
|
|
218
|
+
set,
|
|
219
|
+
// setWith,
|
|
220
|
+
// shuffle,
|
|
221
|
+
// size,
|
|
222
|
+
// slice,
|
|
223
|
+
// snakeCase,
|
|
224
|
+
// some,
|
|
225
|
+
// sortBy,
|
|
226
|
+
// sortedIndex,
|
|
227
|
+
// sortedIndexBy,
|
|
228
|
+
// sortedIndexOf,
|
|
229
|
+
// sortedLastIndex,
|
|
230
|
+
// sortedLastIndexBy,
|
|
231
|
+
// sortedLastIndexOf,
|
|
232
|
+
// split,
|
|
233
|
+
// spread,
|
|
234
|
+
// startCase,
|
|
235
|
+
// startsWith,
|
|
236
|
+
// stubArray,
|
|
237
|
+
// stubFalse,
|
|
238
|
+
// stubObject,
|
|
239
|
+
// stubString,
|
|
240
|
+
// stubTrue,
|
|
241
|
+
// subtract,
|
|
242
|
+
// sum,
|
|
243
|
+
// sumBy,
|
|
244
|
+
// tail,
|
|
245
|
+
// take,
|
|
246
|
+
// takeRight,
|
|
247
|
+
// takeRightWhile,
|
|
248
|
+
// takeWhile,
|
|
249
|
+
// template,
|
|
250
|
+
// templateSettings,
|
|
251
|
+
// throttle,
|
|
252
|
+
// times,
|
|
253
|
+
// toArray,
|
|
254
|
+
// toDefaulted,
|
|
255
|
+
// toFinite,
|
|
256
|
+
// toInteger,
|
|
257
|
+
// toLength,
|
|
258
|
+
// toLower,
|
|
259
|
+
// toNumber,
|
|
260
|
+
// toPairs,
|
|
261
|
+
// toPairsIn,
|
|
262
|
+
// toPath,
|
|
263
|
+
// toPlainObject,
|
|
264
|
+
// toSafeInteger,
|
|
265
|
+
// toString,
|
|
266
|
+
// toUpper,
|
|
267
|
+
// transform,
|
|
268
|
+
// trim,
|
|
269
|
+
// trimEnd,
|
|
270
|
+
// trimStart,
|
|
271
|
+
// truncate,
|
|
272
|
+
// unary,
|
|
273
|
+
// unescape,
|
|
274
|
+
// union,
|
|
275
|
+
// unionBy,
|
|
276
|
+
// unionWith,
|
|
277
|
+
// uniq,
|
|
278
|
+
// uniqBy,
|
|
279
|
+
// uniqWith,
|
|
280
|
+
// uniqueId,
|
|
281
|
+
// unset,
|
|
282
|
+
// unzip,
|
|
283
|
+
// unzipWith,
|
|
284
|
+
// update,
|
|
285
|
+
// updateWith,
|
|
286
|
+
// upperCase,
|
|
287
|
+
// upperFirst,
|
|
288
|
+
// values,
|
|
289
|
+
// valuesIn,
|
|
290
|
+
// without,
|
|
291
|
+
// words,
|
|
292
|
+
// wrap,
|
|
293
|
+
// xor,
|
|
294
|
+
// xorBy,
|
|
295
|
+
// xorWith,
|
|
296
|
+
// zip,
|
|
297
|
+
// zipObject,
|
|
298
|
+
// zipObjectDeep,
|
|
299
|
+
// zipWith
|
|
300
|
+
} from 'es-toolkit/compat';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export {
|
|
2
|
+
after,
|
|
3
|
+
ary,
|
|
4
|
+
asyncNoop,
|
|
5
|
+
before,
|
|
6
|
+
curry,
|
|
7
|
+
curryRight,
|
|
8
|
+
debounce,
|
|
9
|
+
flow,
|
|
10
|
+
flowRight,
|
|
11
|
+
identity,
|
|
12
|
+
memoize,
|
|
13
|
+
negate,
|
|
14
|
+
noop,
|
|
15
|
+
once,
|
|
16
|
+
partial,
|
|
17
|
+
partialRight,
|
|
18
|
+
rest,
|
|
19
|
+
retry,
|
|
20
|
+
spread,
|
|
21
|
+
throttle,
|
|
22
|
+
unary
|
|
23
|
+
} from 'es-toolkit/function';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export {
|
|
2
|
+
clone,
|
|
3
|
+
cloneDeep,
|
|
4
|
+
cloneDeepWith,
|
|
5
|
+
findKey,
|
|
6
|
+
flattenObject,
|
|
7
|
+
invert,
|
|
8
|
+
mapKeys,
|
|
9
|
+
mapValues,
|
|
10
|
+
merge,
|
|
11
|
+
mergeWith,
|
|
12
|
+
omit,
|
|
13
|
+
omitBy,
|
|
14
|
+
pick,
|
|
15
|
+
pickBy,
|
|
16
|
+
toCamelCaseKeys,
|
|
17
|
+
toMerged,
|
|
18
|
+
toSnakeCaseKeys
|
|
19
|
+
} from 'es-toolkit/object';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export {
|
|
2
|
+
isArrayBuffer,
|
|
3
|
+
isBlob,
|
|
4
|
+
isBoolean,
|
|
5
|
+
isBrowser,
|
|
6
|
+
isBuffer,
|
|
7
|
+
isDate,
|
|
8
|
+
isEqual,
|
|
9
|
+
isEqualWith,
|
|
10
|
+
isError,
|
|
11
|
+
isFile,
|
|
12
|
+
isFunction,
|
|
13
|
+
isJSON,
|
|
14
|
+
isJSONArray,
|
|
15
|
+
isJSONObject,
|
|
16
|
+
isJSONValue,
|
|
17
|
+
isLength,
|
|
18
|
+
isMap,
|
|
19
|
+
isNil,
|
|
20
|
+
isNode,
|
|
21
|
+
isNotNil,
|
|
22
|
+
isNull,
|
|
23
|
+
isPlainObject,
|
|
24
|
+
isPrimitive,
|
|
25
|
+
isPromise,
|
|
26
|
+
isRegExp,
|
|
27
|
+
isSet,
|
|
28
|
+
isString,
|
|
29
|
+
isSymbol,
|
|
30
|
+
isTypedArray,
|
|
31
|
+
isUndefined,
|
|
32
|
+
isWeakMap,
|
|
33
|
+
isWeakSet
|
|
34
|
+
} from 'es-toolkit/predicate';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export {
|
|
2
|
+
camelCase,
|
|
3
|
+
capitalize,
|
|
4
|
+
constantCase,
|
|
5
|
+
deburr,
|
|
6
|
+
escape,
|
|
7
|
+
escapeRegExp,
|
|
8
|
+
kebabCase,
|
|
9
|
+
lowerCase,
|
|
10
|
+
lowerFirst,
|
|
11
|
+
pad,
|
|
12
|
+
pascalCase,
|
|
13
|
+
reverseString,
|
|
14
|
+
snakeCase,
|
|
15
|
+
startCase,
|
|
16
|
+
trim,
|
|
17
|
+
trimEnd,
|
|
18
|
+
trimStart,
|
|
19
|
+
unescape,
|
|
20
|
+
upperCase,
|
|
21
|
+
upperFirst,
|
|
22
|
+
words
|
|
23
|
+
} from 'es-toolkit/string';
|