es-toolkit 1.23.0 → 1.24.0-dev.766

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 (135) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +1 -1
  3. package/dist/_chunk/{isWeakSet-BAMm2l.js → isWeakSet-Bd6nry.js} +59 -46
  4. package/dist/_chunk/{range-BXlMmn.js → sumBy-BkErWJ.js} +25 -5
  5. package/dist/_chunk/{isObjectLike-aywuSF.js → toMerged-DDLv0D.js} +88 -86
  6. package/dist/_chunk/{flowRight-Dv8J0U.js → unary-BZ5Ixo.js} +27 -64
  7. package/dist/_chunk/{zipWith-EOU_KZ.js → zipWith-wpjySR.js} +8 -17
  8. package/dist/array/dropRightWhile.d.mts +2 -2
  9. package/dist/array/dropRightWhile.d.ts +2 -2
  10. package/dist/array/dropRightWhile.mjs +1 -1
  11. package/dist/array/dropWhile.d.mts +1 -1
  12. package/dist/array/dropWhile.d.ts +1 -1
  13. package/dist/array/index.js +1 -1
  14. package/dist/array/unionBy.mjs +3 -10
  15. package/dist/browser.global.js +1 -1
  16. package/dist/browser.global.js.map +1 -1
  17. package/dist/compat/_internal/MAX_ARRAY_LENGTH.mjs +3 -0
  18. package/dist/compat/_internal/isIterateeCall.mjs +17 -0
  19. package/dist/compat/array/difference.d.mts +9 -3
  20. package/dist/compat/array/difference.d.ts +9 -3
  21. package/dist/compat/array/difference.mjs +12 -3
  22. package/dist/compat/array/dropRightWhile.d.mts +60 -0
  23. package/dist/compat/array/dropRightWhile.d.ts +60 -0
  24. package/dist/compat/array/dropRightWhile.mjs +27 -0
  25. package/dist/compat/array/every.mjs +4 -5
  26. package/dist/compat/array/filter.mjs +4 -5
  27. package/dist/compat/array/find.mjs +4 -5
  28. package/dist/compat/array/includes.mjs +2 -1
  29. package/dist/compat/array/slice.d.mts +18 -0
  30. package/dist/compat/array/slice.d.ts +18 -0
  31. package/dist/compat/array/slice.mjs +38 -0
  32. package/dist/compat/array/take.d.mts +25 -0
  33. package/dist/compat/array/take.d.ts +25 -0
  34. package/dist/compat/array/take.mjs +10 -0
  35. package/dist/compat/function/before.d.mts +26 -0
  36. package/dist/compat/function/before.d.ts +26 -0
  37. package/dist/compat/function/before.mjs +20 -0
  38. package/dist/compat/function/curryRight.d.mts +50 -0
  39. package/dist/compat/function/curryRight.d.ts +50 -0
  40. package/dist/compat/function/curryRight.mjs +64 -0
  41. package/dist/compat/index.d.mts +86 -75
  42. package/dist/compat/index.d.ts +86 -75
  43. package/dist/compat/index.js +779 -496
  44. package/dist/compat/index.mjs +86 -75
  45. package/dist/compat/object/defaults.d.mts +120 -0
  46. package/dist/compat/object/defaults.d.ts +120 -0
  47. package/dist/compat/object/defaults.mjs +21 -0
  48. package/dist/compat/object/invertBy.d.mts +27 -0
  49. package/dist/compat/object/invertBy.d.ts +27 -0
  50. package/dist/compat/object/invertBy.mjs +27 -0
  51. package/dist/compat/object/omit.d.mts +1 -1
  52. package/dist/compat/object/omit.d.ts +1 -1
  53. package/dist/compat/object/pick.d.mts +1 -1
  54. package/dist/compat/object/pick.d.ts +1 -1
  55. package/dist/compat/object/toDefaulted.d.mts +122 -0
  56. package/dist/compat/object/toDefaulted.d.ts +122 -0
  57. package/dist/compat/object/toDefaulted.mjs +9 -0
  58. package/dist/compat/predicate/isArrayBuffer.d.mts +20 -0
  59. package/dist/compat/predicate/isArrayBuffer.d.ts +20 -0
  60. package/dist/compat/predicate/isArrayBuffer.mjs +7 -0
  61. package/dist/compat/predicate/isDate.d.mts +16 -0
  62. package/dist/compat/predicate/isDate.d.ts +16 -0
  63. package/dist/compat/predicate/isDate.mjs +7 -0
  64. package/dist/compat/predicate/isEqualWith.d.mts +38 -0
  65. package/dist/compat/predicate/isEqualWith.d.ts +38 -0
  66. package/dist/compat/predicate/isEqualWith.mjs +23 -0
  67. package/dist/compat/predicate/isMap.d.mts +20 -0
  68. package/dist/compat/predicate/isMap.d.ts +20 -0
  69. package/dist/compat/predicate/isMap.mjs +7 -0
  70. package/dist/compat/predicate/isMatch.mjs +2 -1
  71. package/dist/compat/predicate/isSet.d.mts +20 -0
  72. package/dist/compat/predicate/isSet.d.ts +20 -0
  73. package/dist/compat/predicate/isSet.mjs +7 -0
  74. package/dist/compat/string/upperCase.mjs +0 -1
  75. package/dist/compat/util/constant.d.mts +16 -0
  76. package/dist/compat/util/constant.d.ts +16 -0
  77. package/dist/compat/util/constant.mjs +5 -0
  78. package/dist/compat/util/defaultTo.d.mts +17 -0
  79. package/dist/compat/util/defaultTo.d.ts +17 -0
  80. package/dist/compat/util/defaultTo.mjs +8 -0
  81. package/dist/compat/util/eq.d.mts +16 -0
  82. package/dist/compat/util/eq.d.ts +16 -0
  83. package/dist/compat/util/eq.mjs +5 -0
  84. package/dist/compat/util/times.d.mts +14 -0
  85. package/dist/compat/util/times.d.ts +14 -0
  86. package/dist/compat/util/times.mjs +15 -0
  87. package/dist/compat/util/toLength.d.mts +18 -0
  88. package/dist/compat/util/toLength.d.ts +18 -0
  89. package/dist/compat/util/toLength.mjs +12 -0
  90. package/dist/function/before.d.mts +2 -2
  91. package/dist/function/before.d.ts +2 -2
  92. package/dist/function/before.mjs +2 -2
  93. package/dist/function/index.d.mts +10 -10
  94. package/dist/function/index.d.ts +10 -10
  95. package/dist/function/index.js +65 -32
  96. package/dist/function/index.mjs +10 -10
  97. package/dist/function/once.d.mts +16 -1
  98. package/dist/function/once.d.ts +16 -1
  99. package/dist/function/once.mjs +5 -7
  100. package/dist/index.d.mts +43 -41
  101. package/dist/index.d.ts +43 -41
  102. package/dist/index.js +59 -57
  103. package/dist/index.mjs +43 -41
  104. package/dist/math/index.d.mts +2 -1
  105. package/dist/math/index.d.ts +2 -1
  106. package/dist/math/index.js +9 -8
  107. package/dist/math/index.mjs +2 -1
  108. package/dist/math/rangeRight.d.mts +38 -0
  109. package/dist/math/rangeRight.d.ts +38 -0
  110. package/dist/math/rangeRight.mjs +20 -0
  111. package/dist/object/index.d.mts +7 -7
  112. package/dist/object/index.d.ts +7 -7
  113. package/dist/object/index.js +32 -32
  114. package/dist/object/index.mjs +7 -7
  115. package/dist/object/omitBy.d.mts +1 -1
  116. package/dist/object/omitBy.d.ts +1 -1
  117. package/dist/object/omitBy.mjs +4 -3
  118. package/dist/object/pickBy.mjs +4 -3
  119. package/dist/predicate/index.d.mts +11 -10
  120. package/dist/predicate/index.d.ts +11 -10
  121. package/dist/predicate/index.js +8 -7
  122. package/dist/predicate/index.mjs +11 -10
  123. package/dist/predicate/isBlob.d.mts +19 -0
  124. package/dist/predicate/isBlob.d.ts +19 -0
  125. package/dist/predicate/isBlob.mjs +8 -0
  126. package/dist/predicate/isEqualWith.mjs +2 -1
  127. package/dist/promise/index.d.mts +1 -1
  128. package/dist/promise/index.d.ts +1 -1
  129. package/dist/promise/index.mjs +1 -1
  130. package/dist/string/index.d.mts +12 -12
  131. package/dist/string/index.d.ts +12 -12
  132. package/dist/string/index.js +20 -20
  133. package/dist/string/index.mjs +12 -12
  134. package/package.json +10 -6
  135. package/dist/_chunk/{pad-BWiShN.js → upperFirst-BUECmK.js} +84 -84
package/dist/index.d.ts CHANGED
@@ -56,91 +56,93 @@ export { zipObject } from './array/zipObject.js';
56
56
  export { zipWith } from './array/zipWith.js';
57
57
  export { AbortError } from './error/AbortError.js';
58
58
  export { TimeoutError } from './error/TimeoutError.js';
59
- export { before } from './function/before.js';
60
59
  export { after } from './function/after.js';
60
+ export { ary } from './function/ary.js';
61
+ export { before } from './function/before.js';
62
+ export { curry } from './function/curry.js';
63
+ export { curryRight } from './function/curryRight.js';
61
64
  export { debounce } from './function/debounce.js';
65
+ export { flow } from './function/flow.js';
66
+ export { flowRight } from './function/flowRight.js';
67
+ export { MemoizeCache, memoize } from './function/memoize.js';
68
+ export { negate } from './function/negate.js';
62
69
  export { noop } from './function/noop.js';
63
70
  export { once } from './function/once.js';
64
- export { throttle } from './function/throttle.js';
65
- export { negate } from './function/negate.js';
66
- export { MemoizeCache, memoize } from './function/memoize.js';
67
- export { ary } from './function/ary.js';
68
- export { unary } from './function/unary.js';
69
71
  export { partial } from './function/partial.js';
70
72
  export { partialRight } from './function/partialRight.js';
71
73
  export { rest } from './function/rest.js';
72
- export { curry } from './function/curry.js';
73
- export { curryRight } from './function/curryRight.js';
74
74
  export { spread } from './function/spread.js';
75
- export { flow } from './function/flow.js';
76
- export { flowRight } from './function/flowRight.js';
75
+ export { throttle } from './function/throttle.js';
76
+ export { unary } from './function/unary.js';
77
77
  export { clamp } from './math/clamp.js';
78
78
  export { inRange } from './math/inRange.js';
79
79
  export { mean } from './math/mean.js';
80
80
  export { meanBy } from './math/meanBy.js';
81
81
  export { random } from './math/random.js';
82
82
  export { randomInt } from './math/randomInt.js';
83
+ export { range } from './math/range.js';
84
+ export { rangeRight } from './math/rangeRight.js';
83
85
  export { round } from './math/round.js';
84
86
  export { sum } from './math/sum.js';
85
87
  export { sumBy } from './math/sumBy.js';
86
- export { range } from './math/range.js';
87
- export { omit } from './object/omit.js';
88
- export { omitBy } from './object/omitBy.js';
89
- export { pick } from './object/pick.js';
90
- export { pickBy } from './object/pickBy.js';
91
- export { invert } from './object/invert.js';
92
88
  export { clone } from './object/clone.js';
89
+ export { cloneDeep } from './object/cloneDeep.js';
93
90
  export { flattenObject } from './object/flattenObject.js';
91
+ export { invert } from './object/invert.js';
94
92
  export { mapKeys } from './object/mapKeys.js';
95
93
  export { mapValues } from './object/mapValues.js';
96
- export { cloneDeep } from './object/cloneDeep.js';
97
94
  export { merge } from './object/merge.js';
98
- export { toMerged } from './object/toMerged.js';
99
95
  export { mergeWith } from './object/mergeWith.js';
96
+ export { omit } from './object/omit.js';
97
+ export { omitBy } from './object/omitBy.js';
98
+ export { pick } from './object/pick.js';
99
+ export { pickBy } from './object/pickBy.js';
100
+ export { toMerged } from './object/toMerged.js';
100
101
  export { isArrayBuffer } from './predicate/isArrayBuffer.js';
102
+ export { isBlob } from './predicate/isBlob.js';
103
+ export { isBoolean } from './predicate/isBoolean.js';
101
104
  export { isDate } from './predicate/isDate.js';
102
105
  export { isEqual } from './predicate/isEqual.js';
103
106
  export { isEqualWith } from './predicate/isEqualWith.js';
104
107
  export { isError } from './predicate/isError.js';
108
+ export { isFunction } from './predicate/isFunction.js';
109
+ export { isJSONArray } from './predicate/isJSONArray.js';
110
+ export { isJSONObject } from './predicate/isJSONObject.js';
111
+ export { isJSONValue } from './predicate/isJSONValue.js';
112
+ export { isLength } from './predicate/isLength.js';
105
113
  export { isMap } from './predicate/isMap.js';
106
114
  export { isNil } from './predicate/isNil.js';
107
115
  export { isNotNil } from './predicate/isNotNil.js';
108
116
  export { isNull } from './predicate/isNull.js';
109
- export { isUndefined } from './predicate/isUndefined.js';
110
- export { isLength } from './predicate/isLength.js';
111
117
  export { isPlainObject } from './predicate/isPlainObject.js';
112
- export { isFunction } from './predicate/isFunction.js';
113
- export { isTypedArray } from './predicate/isTypedArray.js';
114
118
  export { isPrimitive } from './predicate/isPrimitive.js';
115
119
  export { isRegExp } from './predicate/isRegExp.js';
116
- export { isBoolean } from './predicate/isBoolean.js';
117
- export { isSymbol } from './predicate/isSymbol.js';
118
- export { isString } from './predicate/isString.js';
119
- export { isJSONObject } from './predicate/isJSONObject.js';
120
- export { isJSONValue } from './predicate/isJSONValue.js';
121
- export { isJSONArray } from './predicate/isJSONArray.js';
122
120
  export { isSet } from './predicate/isSet.js';
121
+ export { isString } from './predicate/isString.js';
122
+ export { isSymbol } from './predicate/isSymbol.js';
123
+ export { isTypedArray } from './predicate/isTypedArray.js';
124
+ export { isUndefined } from './predicate/isUndefined.js';
123
125
  export { isWeakMap } from './predicate/isWeakMap.js';
124
126
  export { isWeakSet } from './predicate/isWeakSet.js';
125
127
  export { delay } from './promise/delay.js';
126
- export { withTimeout } from './promise/withTimeout.js';
127
128
  export { timeout } from './promise/timeout.js';
129
+ export { withTimeout } from './promise/withTimeout.js';
128
130
  export { camelCase } from './string/camelCase.js';
129
- export { snakeCase } from './string/snakeCase.js';
130
- export { kebabCase } from './string/kebabCase.js';
131
- export { upperCase } from './string/upperCase.js';
132
- export { lowerCase } from './string/lowerCase.js';
133
- export { startCase } from './string/startCase.js';
134
131
  export { capitalize } from './string/capitalize.js';
135
- export { pascalCase } from './string/pascalCase.js';
136
132
  export { constantCase } from './string/constantCase.js';
137
- export { trim } from './string/trim.js';
138
- export { trimStart } from './string/trimStart.js';
139
- export { trimEnd } from './string/trimEnd.js';
140
- export { upperFirst } from './string/upperFirst.js';
141
- export { lowerFirst } from './string/lowerFirst.js';
142
133
  export { deburr } from './string/deburr.js';
143
134
  export { escape } from './string/escape.js';
144
135
  export { escapeRegExp } from './string/escapeRegExp.js';
145
- export { unescape } from './string/unescape.js';
136
+ export { kebabCase } from './string/kebabCase.js';
137
+ export { lowerCase } from './string/lowerCase.js';
138
+ export { lowerFirst } from './string/lowerFirst.js';
146
139
  export { pad } from './string/pad.js';
140
+ export { pascalCase } from './string/pascalCase.js';
141
+ export { snakeCase } from './string/snakeCase.js';
142
+ export { startCase } from './string/startCase.js';
143
+ export { trim } from './string/trim.js';
144
+ export { trimEnd } from './string/trimEnd.js';
145
+ export { trimStart } from './string/trimStart.js';
146
+ export { unescape } from './string/unescape.js';
147
+ export { upperCase } from './string/upperCase.js';
148
+ export { upperFirst } from './string/upperFirst.js';
package/dist/index.js CHANGED
@@ -2,21 +2,21 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const zipWith = require('./_chunk/zipWith-EOU_KZ.js');
5
+ const zipWith = require('./_chunk/zipWith-wpjySR.js');
6
6
  const array_index = require('./array/index.js');
7
7
  const promise_index = require('./_chunk/index-BGZDR9.js');
8
- const flowRight = require('./_chunk/flowRight-Dv8J0U.js');
9
- const noop = require('./_chunk/noop-2IwLUk.js');
8
+ const unary = require('./_chunk/unary-BZ5Ixo.js');
10
9
  const function_index = require('./function/index.js');
11
- const range = require('./_chunk/range-BXlMmn.js');
10
+ const noop = require('./_chunk/noop-2IwLUk.js');
11
+ const sumBy = require('./_chunk/sumBy-BkErWJ.js');
12
12
  const randomInt = require('./_chunk/randomInt-CF7bZK.js');
13
13
  const math_index = require('./math/index.js');
14
+ const toMerged = require('./_chunk/toMerged-DDLv0D.js');
14
15
  const object_index = require('./object/index.js');
15
- const isObjectLike = require('./_chunk/isObjectLike-aywuSF.js');
16
- const isWeakSet = require('./_chunk/isWeakSet-BAMm2l.js');
16
+ const isWeakSet = require('./_chunk/isWeakSet-Bd6nry.js');
17
17
  const predicate_index = require('./predicate/index.js');
18
18
  const isPlainObject = require('./_chunk/isPlainObject-DgrsU7.js');
19
- const pad = require('./_chunk/pad-BWiShN.js');
19
+ const upperFirst = require('./_chunk/upperFirst-BUECmK.js');
20
20
  const string_index = require('./string/index.js');
21
21
 
22
22
 
@@ -82,48 +82,50 @@ exports.TimeoutError = promise_index.TimeoutError;
82
82
  exports.delay = promise_index.delay;
83
83
  exports.timeout = promise_index.timeout;
84
84
  exports.withTimeout = promise_index.withTimeout;
85
- exports.after = flowRight.after;
86
- exports.ary = flowRight.ary;
87
- exports.before = flowRight.before;
88
- exports.curryRight = flowRight.curryRight;
89
- exports.debounce = flowRight.debounce;
90
- exports.flow = flowRight.flow;
91
- exports.flowRight = flowRight.flowRight;
92
- exports.memoize = flowRight.memoize;
93
- exports.negate = flowRight.negate;
94
- exports.once = flowRight.once;
95
- exports.partial = flowRight.partial;
96
- exports.partialRight = flowRight.partialRight;
97
- exports.rest = flowRight.rest;
98
- exports.unary = flowRight.unary;
99
- exports.noop = noop.noop;
85
+ exports.after = unary.after;
86
+ exports.ary = unary.ary;
87
+ exports.debounce = unary.debounce;
88
+ exports.flow = unary.flow;
89
+ exports.flowRight = unary.flowRight;
90
+ exports.memoize = unary.memoize;
91
+ exports.negate = unary.negate;
92
+ exports.once = unary.once;
93
+ exports.partial = unary.partial;
94
+ exports.partialRight = unary.partialRight;
95
+ exports.rest = unary.rest;
96
+ exports.unary = unary.unary;
97
+ exports.before = function_index.before;
100
98
  exports.curry = function_index.curry;
99
+ exports.curryRight = function_index.curryRight;
101
100
  exports.spread = function_index.spread;
102
101
  exports.throttle = function_index.throttle;
103
- exports.clamp = range.clamp;
104
- exports.inRange = range.inRange;
105
- exports.mean = range.mean;
106
- exports.meanBy = range.meanBy;
107
- exports.range = range.range;
108
- exports.sum = range.sum;
109
- exports.sumBy = range.sumBy;
102
+ exports.noop = noop.noop;
103
+ exports.clamp = sumBy.clamp;
104
+ exports.inRange = sumBy.inRange;
105
+ exports.mean = sumBy.mean;
106
+ exports.meanBy = sumBy.meanBy;
107
+ exports.range = sumBy.range;
108
+ exports.rangeRight = sumBy.rangeRight;
109
+ exports.sum = sumBy.sum;
110
+ exports.sumBy = sumBy.sumBy;
110
111
  exports.random = randomInt.random;
111
112
  exports.randomInt = randomInt.randomInt;
112
113
  exports.round = math_index.round;
114
+ exports.clone = toMerged.clone;
115
+ exports.cloneDeep = toMerged.cloneDeep;
116
+ exports.flattenObject = toMerged.flattenObject;
117
+ exports.invert = toMerged.invert;
118
+ exports.mapKeys = toMerged.mapKeys;
119
+ exports.mapValues = toMerged.mapValues;
120
+ exports.merge = toMerged.merge;
121
+ exports.omitBy = toMerged.omitBy;
122
+ exports.pickBy = toMerged.pickBy;
123
+ exports.toMerged = toMerged.toMerged;
113
124
  exports.mergeWith = object_index.mergeWith;
114
125
  exports.omit = object_index.omit;
115
126
  exports.pick = object_index.pick;
116
- exports.clone = isObjectLike.clone;
117
- exports.cloneDeep = isObjectLike.cloneDeep;
118
- exports.flattenObject = isObjectLike.flattenObject;
119
- exports.invert = isObjectLike.invert;
120
- exports.mapKeys = isObjectLike.mapKeys;
121
- exports.mapValues = isObjectLike.mapValues;
122
- exports.merge = isObjectLike.merge;
123
- exports.omitBy = isObjectLike.omitBy;
124
- exports.pickBy = isObjectLike.pickBy;
125
- exports.toMerged = isObjectLike.toMerged;
126
127
  exports.isArrayBuffer = isWeakSet.isArrayBuffer;
128
+ exports.isBlob = isWeakSet.isBlob;
127
129
  exports.isDate = isWeakSet.isDate;
128
130
  exports.isEqual = isWeakSet.isEqual;
129
131
  exports.isEqualWith = isWeakSet.isEqualWith;
@@ -148,22 +150,22 @@ exports.isSymbol = predicate_index.isSymbol;
148
150
  exports.isPlainObject = isPlainObject.isPlainObject;
149
151
  exports.isPrimitive = isPlainObject.isPrimitive;
150
152
  exports.isTypedArray = isPlainObject.isTypedArray;
151
- exports.camelCase = pad.camelCase;
152
- exports.capitalize = pad.capitalize;
153
- exports.constantCase = pad.constantCase;
154
- exports.deburr = pad.deburr;
155
- exports.escape = pad.escape;
156
- exports.escapeRegExp = pad.escapeRegExp;
157
- exports.kebabCase = pad.kebabCase;
158
- exports.lowerCase = pad.lowerCase;
159
- exports.lowerFirst = pad.lowerFirst;
160
- exports.pad = pad.pad;
161
- exports.pascalCase = pad.pascalCase;
162
- exports.snakeCase = pad.snakeCase;
163
- exports.trim = pad.trim;
164
- exports.trimEnd = pad.trimEnd;
165
- exports.trimStart = pad.trimStart;
166
- exports.unescape = pad.unescape;
167
- exports.upperCase = pad.upperCase;
168
- exports.upperFirst = pad.upperFirst;
153
+ exports.camelCase = upperFirst.camelCase;
154
+ exports.capitalize = upperFirst.capitalize;
155
+ exports.constantCase = upperFirst.constantCase;
156
+ exports.deburr = upperFirst.deburr;
157
+ exports.escape = upperFirst.escape;
158
+ exports.escapeRegExp = upperFirst.escapeRegExp;
159
+ exports.kebabCase = upperFirst.kebabCase;
160
+ exports.lowerCase = upperFirst.lowerCase;
161
+ exports.lowerFirst = upperFirst.lowerFirst;
162
+ exports.pad = upperFirst.pad;
163
+ exports.pascalCase = upperFirst.pascalCase;
164
+ exports.snakeCase = upperFirst.snakeCase;
165
+ exports.trim = upperFirst.trim;
166
+ exports.trimEnd = upperFirst.trimEnd;
167
+ exports.trimStart = upperFirst.trimStart;
168
+ exports.unescape = upperFirst.unescape;
169
+ exports.upperCase = upperFirst.upperCase;
170
+ exports.upperFirst = upperFirst.upperFirst;
169
171
  exports.startCase = string_index.startCase;
package/dist/index.mjs CHANGED
@@ -56,91 +56,93 @@ export { zipObject } from './array/zipObject.mjs';
56
56
  export { zipWith } from './array/zipWith.mjs';
57
57
  export { AbortError } from './error/AbortError.mjs';
58
58
  export { TimeoutError } from './error/TimeoutError.mjs';
59
- export { before } from './function/before.mjs';
60
59
  export { after } from './function/after.mjs';
60
+ export { ary } from './function/ary.mjs';
61
+ export { before } from './function/before.mjs';
62
+ export { curry } from './function/curry.mjs';
63
+ export { curryRight } from './function/curryRight.mjs';
61
64
  export { debounce } from './function/debounce.mjs';
65
+ export { flow } from './function/flow.mjs';
66
+ export { flowRight } from './function/flowRight.mjs';
67
+ export { memoize } from './function/memoize.mjs';
68
+ export { negate } from './function/negate.mjs';
62
69
  export { noop } from './function/noop.mjs';
63
70
  export { once } from './function/once.mjs';
64
- export { throttle } from './function/throttle.mjs';
65
- export { negate } from './function/negate.mjs';
66
- export { memoize } from './function/memoize.mjs';
67
- export { ary } from './function/ary.mjs';
68
- export { unary } from './function/unary.mjs';
69
71
  export { partial } from './function/partial.mjs';
70
72
  export { partialRight } from './function/partialRight.mjs';
71
73
  export { rest } from './function/rest.mjs';
72
- export { curry } from './function/curry.mjs';
73
- export { curryRight } from './function/curryRight.mjs';
74
74
  export { spread } from './function/spread.mjs';
75
- export { flow } from './function/flow.mjs';
76
- export { flowRight } from './function/flowRight.mjs';
75
+ export { throttle } from './function/throttle.mjs';
76
+ export { unary } from './function/unary.mjs';
77
77
  export { clamp } from './math/clamp.mjs';
78
78
  export { inRange } from './math/inRange.mjs';
79
79
  export { mean } from './math/mean.mjs';
80
80
  export { meanBy } from './math/meanBy.mjs';
81
81
  export { random } from './math/random.mjs';
82
82
  export { randomInt } from './math/randomInt.mjs';
83
+ export { range } from './math/range.mjs';
84
+ export { rangeRight } from './math/rangeRight.mjs';
83
85
  export { round } from './math/round.mjs';
84
86
  export { sum } from './math/sum.mjs';
85
87
  export { sumBy } from './math/sumBy.mjs';
86
- export { range } from './math/range.mjs';
87
- export { omit } from './object/omit.mjs';
88
- export { omitBy } from './object/omitBy.mjs';
89
- export { pick } from './object/pick.mjs';
90
- export { pickBy } from './object/pickBy.mjs';
91
- export { invert } from './object/invert.mjs';
92
88
  export { clone } from './object/clone.mjs';
89
+ export { cloneDeep } from './object/cloneDeep.mjs';
93
90
  export { flattenObject } from './object/flattenObject.mjs';
91
+ export { invert } from './object/invert.mjs';
94
92
  export { mapKeys } from './object/mapKeys.mjs';
95
93
  export { mapValues } from './object/mapValues.mjs';
96
- export { cloneDeep } from './object/cloneDeep.mjs';
97
94
  export { merge } from './object/merge.mjs';
98
- export { toMerged } from './object/toMerged.mjs';
99
95
  export { mergeWith } from './object/mergeWith.mjs';
96
+ export { omit } from './object/omit.mjs';
97
+ export { omitBy } from './object/omitBy.mjs';
98
+ export { pick } from './object/pick.mjs';
99
+ export { pickBy } from './object/pickBy.mjs';
100
+ export { toMerged } from './object/toMerged.mjs';
100
101
  export { isArrayBuffer } from './predicate/isArrayBuffer.mjs';
102
+ export { isBlob } from './predicate/isBlob.mjs';
103
+ export { isBoolean } from './predicate/isBoolean.mjs';
101
104
  export { isDate } from './predicate/isDate.mjs';
102
105
  export { isEqual } from './predicate/isEqual.mjs';
103
106
  export { isEqualWith } from './predicate/isEqualWith.mjs';
104
107
  export { isError } from './predicate/isError.mjs';
108
+ export { isFunction } from './predicate/isFunction.mjs';
109
+ export { isJSONArray } from './predicate/isJSONArray.mjs';
110
+ export { isJSONObject } from './predicate/isJSONObject.mjs';
111
+ export { isJSONValue } from './predicate/isJSONValue.mjs';
112
+ export { isLength } from './predicate/isLength.mjs';
105
113
  export { isMap } from './predicate/isMap.mjs';
106
114
  export { isNil } from './predicate/isNil.mjs';
107
115
  export { isNotNil } from './predicate/isNotNil.mjs';
108
116
  export { isNull } from './predicate/isNull.mjs';
109
- export { isUndefined } from './predicate/isUndefined.mjs';
110
- export { isLength } from './predicate/isLength.mjs';
111
117
  export { isPlainObject } from './predicate/isPlainObject.mjs';
112
- export { isFunction } from './predicate/isFunction.mjs';
113
- export { isTypedArray } from './predicate/isTypedArray.mjs';
114
118
  export { isPrimitive } from './predicate/isPrimitive.mjs';
115
119
  export { isRegExp } from './predicate/isRegExp.mjs';
116
- export { isBoolean } from './predicate/isBoolean.mjs';
117
- export { isSymbol } from './predicate/isSymbol.mjs';
118
- export { isString } from './predicate/isString.mjs';
119
- export { isJSONObject } from './predicate/isJSONObject.mjs';
120
- export { isJSONValue } from './predicate/isJSONValue.mjs';
121
- export { isJSONArray } from './predicate/isJSONArray.mjs';
122
120
  export { isSet } from './predicate/isSet.mjs';
121
+ export { isString } from './predicate/isString.mjs';
122
+ export { isSymbol } from './predicate/isSymbol.mjs';
123
+ export { isTypedArray } from './predicate/isTypedArray.mjs';
124
+ export { isUndefined } from './predicate/isUndefined.mjs';
123
125
  export { isWeakMap } from './predicate/isWeakMap.mjs';
124
126
  export { isWeakSet } from './predicate/isWeakSet.mjs';
125
127
  export { delay } from './promise/delay.mjs';
126
- export { withTimeout } from './promise/withTimeout.mjs';
127
128
  export { timeout } from './promise/timeout.mjs';
129
+ export { withTimeout } from './promise/withTimeout.mjs';
128
130
  export { camelCase } from './string/camelCase.mjs';
129
- export { snakeCase } from './string/snakeCase.mjs';
130
- export { kebabCase } from './string/kebabCase.mjs';
131
- export { upperCase } from './string/upperCase.mjs';
132
- export { lowerCase } from './string/lowerCase.mjs';
133
- export { startCase } from './string/startCase.mjs';
134
131
  export { capitalize } from './string/capitalize.mjs';
135
- export { pascalCase } from './string/pascalCase.mjs';
136
132
  export { constantCase } from './string/constantCase.mjs';
137
- export { trim } from './string/trim.mjs';
138
- export { trimStart } from './string/trimStart.mjs';
139
- export { trimEnd } from './string/trimEnd.mjs';
140
- export { upperFirst } from './string/upperFirst.mjs';
141
- export { lowerFirst } from './string/lowerFirst.mjs';
142
133
  export { deburr } from './string/deburr.mjs';
143
134
  export { escape } from './string/escape.mjs';
144
135
  export { escapeRegExp } from './string/escapeRegExp.mjs';
145
- export { unescape } from './string/unescape.mjs';
136
+ export { kebabCase } from './string/kebabCase.mjs';
137
+ export { lowerCase } from './string/lowerCase.mjs';
138
+ export { lowerFirst } from './string/lowerFirst.mjs';
146
139
  export { pad } from './string/pad.mjs';
140
+ export { pascalCase } from './string/pascalCase.mjs';
141
+ export { snakeCase } from './string/snakeCase.mjs';
142
+ export { startCase } from './string/startCase.mjs';
143
+ export { trim } from './string/trim.mjs';
144
+ export { trimEnd } from './string/trimEnd.mjs';
145
+ export { trimStart } from './string/trimStart.mjs';
146
+ export { unescape } from './string/unescape.mjs';
147
+ export { upperCase } from './string/upperCase.mjs';
148
+ export { upperFirst } from './string/upperFirst.mjs';
@@ -4,7 +4,8 @@ export { mean } from './mean.mjs';
4
4
  export { meanBy } from './meanBy.mjs';
5
5
  export { random } from './random.mjs';
6
6
  export { randomInt } from './randomInt.mjs';
7
+ export { range } from './range.mjs';
8
+ export { rangeRight } from './rangeRight.mjs';
7
9
  export { round } from './round.mjs';
8
10
  export { sum } from './sum.mjs';
9
11
  export { sumBy } from './sumBy.mjs';
10
- export { range } from './range.mjs';
@@ -4,7 +4,8 @@ export { mean } from './mean.js';
4
4
  export { meanBy } from './meanBy.js';
5
5
  export { random } from './random.js';
6
6
  export { randomInt } from './randomInt.js';
7
+ export { range } from './range.js';
8
+ export { rangeRight } from './rangeRight.js';
7
9
  export { round } from './round.js';
8
10
  export { sum } from './sum.js';
9
11
  export { sumBy } from './sumBy.js';
10
- export { range } from './range.js';
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const range = require('../_chunk/range-BXlMmn.js');
5
+ const sumBy = require('../_chunk/sumBy-BkErWJ.js');
6
6
  const randomInt = require('../_chunk/randomInt-CF7bZK.js');
7
7
 
8
8
  function round(value, precision = 0) {
@@ -13,13 +13,14 @@ function round(value, precision = 0) {
13
13
  return Math.round(value * multiplier) / multiplier;
14
14
  }
15
15
 
16
- exports.clamp = range.clamp;
17
- exports.inRange = range.inRange;
18
- exports.mean = range.mean;
19
- exports.meanBy = range.meanBy;
20
- exports.range = range.range;
21
- exports.sum = range.sum;
22
- exports.sumBy = range.sumBy;
16
+ exports.clamp = sumBy.clamp;
17
+ exports.inRange = sumBy.inRange;
18
+ exports.mean = sumBy.mean;
19
+ exports.meanBy = sumBy.meanBy;
20
+ exports.range = sumBy.range;
21
+ exports.rangeRight = sumBy.rangeRight;
22
+ exports.sum = sumBy.sum;
23
+ exports.sumBy = sumBy.sumBy;
23
24
  exports.random = randomInt.random;
24
25
  exports.randomInt = randomInt.randomInt;
25
26
  exports.round = round;
@@ -4,7 +4,8 @@ export { mean } from './mean.mjs';
4
4
  export { meanBy } from './meanBy.mjs';
5
5
  export { random } from './random.mjs';
6
6
  export { randomInt } from './randomInt.mjs';
7
+ export { range } from './range.mjs';
8
+ export { rangeRight } from './rangeRight.mjs';
7
9
  export { round } from './round.mjs';
8
10
  export { sum } from './sum.mjs';
9
11
  export { sumBy } from './sumBy.mjs';
10
- export { range } from './range.mjs';
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Returns an array of numbers from `end` (exclusive) to `0` (inclusive), decrementing by `1`.
3
+ *
4
+ * @param {number} end - The end number of the range (exclusive).
5
+ * @returns {number[]} An array of numbers from `end` (exclusive) to `0` (inclusive) with a step of `1`.
6
+ *
7
+ * @example
8
+ * // Returns [3, 2, 1, 0]
9
+ * rangeRight(4);
10
+ */
11
+ declare function rangeRight(end: number): number[];
12
+ /**
13
+ * Returns an array of numbers from `end` (exclusive) to `start` (inclusive), decrementing by `1`.
14
+ *
15
+ * @param {number} start - The starting number of the range (inclusive).
16
+ * @param {number} end - The end number of the range (exclusive).
17
+ * @returns {number[]} An array of numbers from `end` (exclusive) to `start` (inclusive) with a step of `1`.
18
+ *
19
+ * @example
20
+ * // Returns [3, 2, 1]
21
+ * rangeRight(1, 4);
22
+ */
23
+ declare function rangeRight(start: number, end: number): number[];
24
+ /**
25
+ * Returns an array of numbers from `end` (exclusive) to `start` (inclusive), decrementing by `step`.
26
+ *
27
+ * @param {number} start - The starting number of the range (inclusive).
28
+ * @param {number} end - The end number of the range (exclusive).
29
+ * @param {number} step - The step value for the range.
30
+ * @returns {number[]} An array of numbers from `end` (exclusive) to `start` (inclusive) with the specified `step`.
31
+ *
32
+ * @example
33
+ * // Returns [15, 10, 5, 0]
34
+ * rangeRight(0, 20, 5);
35
+ */
36
+ declare function rangeRight(start: number, end: number, step: number): number[];
37
+
38
+ export { rangeRight };
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Returns an array of numbers from `end` (exclusive) to `0` (inclusive), decrementing by `1`.
3
+ *
4
+ * @param {number} end - The end number of the range (exclusive).
5
+ * @returns {number[]} An array of numbers from `end` (exclusive) to `0` (inclusive) with a step of `1`.
6
+ *
7
+ * @example
8
+ * // Returns [3, 2, 1, 0]
9
+ * rangeRight(4);
10
+ */
11
+ declare function rangeRight(end: number): number[];
12
+ /**
13
+ * Returns an array of numbers from `end` (exclusive) to `start` (inclusive), decrementing by `1`.
14
+ *
15
+ * @param {number} start - The starting number of the range (inclusive).
16
+ * @param {number} end - The end number of the range (exclusive).
17
+ * @returns {number[]} An array of numbers from `end` (exclusive) to `start` (inclusive) with a step of `1`.
18
+ *
19
+ * @example
20
+ * // Returns [3, 2, 1]
21
+ * rangeRight(1, 4);
22
+ */
23
+ declare function rangeRight(start: number, end: number): number[];
24
+ /**
25
+ * Returns an array of numbers from `end` (exclusive) to `start` (inclusive), decrementing by `step`.
26
+ *
27
+ * @param {number} start - The starting number of the range (inclusive).
28
+ * @param {number} end - The end number of the range (exclusive).
29
+ * @param {number} step - The step value for the range.
30
+ * @returns {number[]} An array of numbers from `end` (exclusive) to `start` (inclusive) with the specified `step`.
31
+ *
32
+ * @example
33
+ * // Returns [15, 10, 5, 0]
34
+ * rangeRight(0, 20, 5);
35
+ */
36
+ declare function rangeRight(start: number, end: number, step: number): number[];
37
+
38
+ export { rangeRight };
@@ -0,0 +1,20 @@
1
+ function rangeRight(start, end, step) {
2
+ if (end == null) {
3
+ end = start;
4
+ start = 0;
5
+ }
6
+ if (step == null) {
7
+ step = 1;
8
+ }
9
+ if (!Number.isInteger(step) || step === 0) {
10
+ throw new Error(`The step value must be a non-zero integer.`);
11
+ }
12
+ const length = Math.max(Math.ceil((end - start) / step), 0);
13
+ const result = new Array(length);
14
+ for (let i = 0; i < length; i++) {
15
+ result[i] = start + (length - i - 1) * step;
16
+ }
17
+ return result;
18
+ }
19
+
20
+ export { rangeRight };
@@ -1,13 +1,13 @@
1
- export { omit } from './omit.mjs';
2
- export { omitBy } from './omitBy.mjs';
3
- export { pick } from './pick.mjs';
4
- export { pickBy } from './pickBy.mjs';
5
- export { invert } from './invert.mjs';
6
1
  export { clone } from './clone.mjs';
2
+ export { cloneDeep } from './cloneDeep.mjs';
7
3
  export { flattenObject } from './flattenObject.mjs';
4
+ export { invert } from './invert.mjs';
8
5
  export { mapKeys } from './mapKeys.mjs';
9
6
  export { mapValues } from './mapValues.mjs';
10
- export { cloneDeep } from './cloneDeep.mjs';
11
7
  export { merge } from './merge.mjs';
12
- export { toMerged } from './toMerged.mjs';
13
8
  export { mergeWith } from './mergeWith.mjs';
9
+ export { omit } from './omit.mjs';
10
+ export { omitBy } from './omitBy.mjs';
11
+ export { pick } from './pick.mjs';
12
+ export { pickBy } from './pickBy.mjs';
13
+ export { toMerged } from './toMerged.mjs';
@@ -1,13 +1,13 @@
1
- export { omit } from './omit.js';
2
- export { omitBy } from './omitBy.js';
3
- export { pick } from './pick.js';
4
- export { pickBy } from './pickBy.js';
5
- export { invert } from './invert.js';
6
1
  export { clone } from './clone.js';
2
+ export { cloneDeep } from './cloneDeep.js';
7
3
  export { flattenObject } from './flattenObject.js';
4
+ export { invert } from './invert.js';
8
5
  export { mapKeys } from './mapKeys.js';
9
6
  export { mapValues } from './mapValues.js';
10
- export { cloneDeep } from './cloneDeep.js';
11
7
  export { merge } from './merge.js';
12
- export { toMerged } from './toMerged.js';
13
8
  export { mergeWith } from './mergeWith.js';
9
+ export { omit } from './omit.js';
10
+ export { omitBy } from './omitBy.js';
11
+ export { pick } from './pick.js';
12
+ export { pickBy } from './pickBy.js';
13
+ export { toMerged } from './toMerged.js';