es-toolkit 1.10.0-dev.207 → 1.10.0-dev.210
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/dist/array/chunk.mjs +1 -1
- package/dist/array/compact.mjs +1 -1
- package/dist/array/countBy.mjs +1 -1
- package/dist/array/difference.mjs +1 -1
- package/dist/array/differenceBy.mjs +1 -1
- package/dist/array/differenceWith.mjs +1 -1
- package/dist/array/drop.mjs +1 -1
- package/dist/array/dropRight.mjs +1 -1
- package/dist/array/dropRightWhile.mjs +1 -1
- package/dist/array/dropWhile.mjs +1 -1
- package/dist/array/fill.mjs +1 -1
- package/dist/array/flatten.mjs +1 -1
- package/dist/array/flattenDeep.mjs +1 -1
- package/dist/array/forEachRight.mjs +1 -1
- package/dist/array/groupBy.mjs +1 -1
- package/dist/array/head.mjs +1 -1
- package/dist/array/index.mjs +51 -51
- package/dist/array/initial.mjs +1 -1
- package/dist/array/intersection.mjs +1 -1
- package/dist/array/intersectionBy.mjs +1 -1
- package/dist/array/intersectionWith.mjs +1 -1
- package/dist/array/keyBy.mjs +1 -1
- package/dist/array/last.mjs +1 -1
- package/dist/array/maxBy.mjs +1 -1
- package/dist/array/minBy.mjs +1 -1
- package/dist/array/orderBy.mjs +1 -1
- package/dist/array/partition.mjs +1 -1
- package/dist/array/sample.mjs +1 -1
- package/dist/array/sampleSize.mjs +1 -1
- package/dist/array/shuffle.mjs +1 -1
- package/dist/array/tail.mjs +1 -1
- package/dist/array/take.mjs +1 -1
- package/dist/array/takeRight.mjs +1 -1
- package/dist/array/takeRightWhile.mjs +1 -1
- package/dist/array/takeWhile.mjs +1 -1
- package/dist/array/toFilled.mjs +1 -1
- package/dist/array/union.mjs +1 -1
- package/dist/array/unionBy.mjs +1 -1
- package/dist/array/unionWith.mjs +1 -1
- package/dist/array/uniq.mjs +1 -1
- package/dist/array/uniqBy.mjs +1 -1
- package/dist/array/uniqWith.mjs +1 -1
- package/dist/array/unzip.mjs +1 -1
- package/dist/array/unzipWith.mjs +1 -1
- package/dist/array/without.mjs +1 -1
- package/dist/array/xor.mjs +1 -1
- package/dist/array/xorBy.mjs +1 -1
- package/dist/array/xorWith.mjs +1 -1
- package/dist/array/zip.mjs +1 -1
- package/dist/array/zipObject.mjs +1 -1
- package/dist/array/zipWith.mjs +1 -1
- package/dist/chunk-2MM5EJJX.mjs +21 -0
- package/dist/{chunk-4E4D3BMI.mjs → chunk-QZITBKWX.mjs} +2 -2
- package/dist/chunk-Y5V7UAZZ.mjs +21 -0
- package/dist/chunk-Y5V7UAZZ.mjs.map +1 -0
- package/dist/compat/index.js +6 -5515
- package/dist/compat/index.js.map +1 -1
- package/dist/compat/index.mjs +74 -74
- package/dist/error/AbortError.mjs +1 -1
- package/dist/error/index.mjs +1 -1
- package/dist/function/debounce.mjs +1 -1
- package/dist/function/index.mjs +7 -7
- package/dist/function/negate.mjs +1 -1
- package/dist/function/noop.mjs +1 -1
- package/dist/function/once.mjs +1 -1
- package/dist/function/throttle.mjs +1 -1
- package/dist/index.js +6 -5515
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +74 -74
- package/dist/math/clamp.mjs +1 -1
- package/dist/math/inRange.mjs +1 -1
- package/dist/math/index.mjs +1 -1
- package/dist/math/mean.mjs +1 -1
- package/dist/math/meanBy.mjs +1 -1
- package/dist/math/random.mjs +1 -1
- package/dist/math/randomInt.mjs +1 -1
- package/dist/math/range.mjs +1 -1
- package/dist/math/round.mjs +1 -1
- package/dist/math/sum.mjs +1 -1
- package/dist/math/sumBy.mjs +1 -1
- package/dist/object/clone.mjs +1 -1
- package/dist/object/index.mjs +2 -2
- package/dist/object/invert.mjs +1 -1
- package/dist/object/omit.mjs +2 -2
- package/dist/object/omitBy.mjs +1 -1
- package/dist/object/pick.mjs +1 -1
- package/dist/object/pickBy.mjs +1 -1
- package/dist/predicate/index.mjs +1 -1
- package/dist/predicate/isEqual.mjs +1 -1
- package/dist/predicate/isNil.mjs +1 -1
- package/dist/predicate/isNotNil.mjs +1 -1
- package/dist/predicate/isNull.mjs +1 -1
- package/dist/predicate/isUndefined.mjs +1 -1
- package/dist/promise/delay.mjs +1 -1
- package/dist/promise/index.mjs +1 -1
- package/dist/string/camelCase.js +6 -5508
- package/dist/string/camelCase.js.map +1 -1
- package/dist/string/camelCase.mjs +3 -2
- package/dist/string/capitalize.mjs +1 -1
- package/dist/string/index.js +6 -5515
- package/dist/string/index.js.map +1 -1
- package/dist/string/index.mjs +5 -5
- package/dist/string/kebabCase.mjs +1 -1
- package/dist/string/lowerCase.mjs +1 -1
- package/dist/string/snakeCase.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-2HIMLZE3.mjs +0 -46
- package/dist/chunk-XGCYC4YA.mjs +0 -5516
- package/dist/chunk-XGCYC4YA.mjs.map +0 -1
- /package/dist/{chunk-2HIMLZE3.mjs.map → chunk-2MM5EJJX.mjs.map} +0 -0
- /package/dist/{chunk-4E4D3BMI.mjs.map → chunk-QZITBKWX.mjs.map} +0 -0
package/dist/array/zipWith.mjs
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
__spreadValues
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=chunk-2MM5EJJX.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__spreadValues
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2MM5EJJX.mjs";
|
|
4
4
|
|
|
5
5
|
// src/object/omit.ts
|
|
6
6
|
function omit(obj, keys) {
|
|
@@ -14,4 +14,4 @@ function omit(obj, keys) {
|
|
|
14
14
|
export {
|
|
15
15
|
omit
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=chunk-
|
|
17
|
+
//# sourceMappingURL=chunk-QZITBKWX.mjs.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {
|
|
2
|
+
capitalize
|
|
3
|
+
} from "./chunk-U56ZOM7L.mjs";
|
|
4
|
+
import {
|
|
5
|
+
getWords
|
|
6
|
+
} from "./chunk-WVQ7YVRK.mjs";
|
|
7
|
+
|
|
8
|
+
// src/string/camelCase.ts
|
|
9
|
+
function camelCase(str) {
|
|
10
|
+
const words = getWords(str);
|
|
11
|
+
if (words.length === 0) {
|
|
12
|
+
return "";
|
|
13
|
+
}
|
|
14
|
+
const [first, ...rest] = words;
|
|
15
|
+
return `${first.toLowerCase()}${rest.map((word) => capitalize(word)).join("")}`;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
camelCase
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=chunk-Y5V7UAZZ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/string/camelCase.ts"],"sourcesContent":["import { capitalize } from \"./capitalize.ts\";\nimport { getWords } from \"./_internal/getWords.ts\";\n\n/**\n * Converts a string to camel case.\n *\n * camel case is the naming convention in which each word is written in lowercase and separated by an underscore (_) character.\n *\n * @param {string} str - The string that is to be changed to camel case.\n * @returns {string} - The converted string to camel case.\n *\n * @example\n * const convertedStr1 = camelCase('camelCase') // returns 'camelCase'\n * const convertedStr2 = camelCase('some whitespace') // returns 'someWhitespace'\n * const convertedStr3 = camelCase('hyphen-text') // returns 'hyphenText'\n * const convertedStr4 = camelCase('HTTPRequest') // returns 'httpRequest'\n */\n\nexport function camelCase(str: string): string {\n const words = getWords(str);\n\n if (words.length === 0) {\n return \"\";\n }\n\n const [first, ...rest] = words;\n\n return `${first.toLowerCase()}${rest.map((word) => capitalize(word)).join(\"\")\n }`;\n}\n"],"mappings":";;;;;;;;AAkBO,SAAS,UAAU,KAAqB;AAC7C,QAAM,QAAQ,SAAS,GAAG;AAE1B,MAAI,MAAM,WAAW,GAAG;AACtB,WAAO;AAAA,EACT;AAEA,QAAM,CAAC,OAAO,GAAG,IAAI,IAAI;AAEzB,SAAO,GAAG,MAAM,YAAY,CAAC,GAAG,KAAK,IAAI,CAAC,SAAS,WAAW,IAAI,CAAC,EAAE,KAAK,EAAE,CAC1E;AACJ;","names":[]}
|