qidian-shared 1.0.21 → 1.0.23
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/qidian-shared.cjs.js +10 -0
- package/dist/qidian-shared.cjs.js.map +1 -1
- package/dist/qidian-shared.es.js +10 -0
- package/dist/qidian-shared.es.js.map +1 -1
- package/dist/qidian-shared.umd.js +10 -0
- package/dist/qidian-shared.umd.js.map +1 -1
- package/dist/utils/data.d.ts +1 -1
- package/dist/utils/str.d.ts +2 -0
- package/package.json +1 -1
package/dist/qidian-shared.es.js
CHANGED
|
@@ -11959,6 +11959,14 @@ function initialConversion(str, isLowerCase) {
|
|
|
11959
11959
|
return str.charAt(0).toLowerCase() + str.slice(1);
|
|
11960
11960
|
}
|
|
11961
11961
|
}
|
|
11962
|
+
function camelize(str) {
|
|
11963
|
+
return str.replace(/-(\w)/g, (_, c) => {
|
|
11964
|
+
return c ? c.toUpperCase() : "";
|
|
11965
|
+
});
|
|
11966
|
+
}
|
|
11967
|
+
function kebabCase(str, separator = "-") {
|
|
11968
|
+
return str.replace(/([A-Z])/g, `${separator}$1`).toLowerCase();
|
|
11969
|
+
}
|
|
11962
11970
|
function getUrlParams(url) {
|
|
11963
11971
|
url = url || window?.location.href;
|
|
11964
11972
|
const res = {};
|
|
@@ -12413,6 +12421,7 @@ function useTimer(type = "timeout") {
|
|
|
12413
12421
|
export {
|
|
12414
12422
|
MD5,
|
|
12415
12423
|
buildTree,
|
|
12424
|
+
camelize,
|
|
12416
12425
|
createEnum,
|
|
12417
12426
|
decrypt,
|
|
12418
12427
|
decryptBase64,
|
|
@@ -12435,6 +12444,7 @@ export {
|
|
|
12435
12444
|
isFunction,
|
|
12436
12445
|
isObject,
|
|
12437
12446
|
isPromise,
|
|
12447
|
+
kebabCase,
|
|
12438
12448
|
noop,
|
|
12439
12449
|
objToStr,
|
|
12440
12450
|
resize,
|