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.
@@ -11961,6 +11961,14 @@ function initialConversion(str, isLowerCase) {
11961
11961
  return str.charAt(0).toLowerCase() + str.slice(1);
11962
11962
  }
11963
11963
  }
11964
+ function camelize(str) {
11965
+ return str.replace(/-(\w)/g, (_, c) => {
11966
+ return c ? c.toUpperCase() : "";
11967
+ });
11968
+ }
11969
+ function kebabCase(str, separator = "-") {
11970
+ return str.replace(/([A-Z])/g, `${separator}$1`).toLowerCase();
11971
+ }
11964
11972
  function getUrlParams(url) {
11965
11973
  url = url || window?.location.href;
11966
11974
  const res = {};
@@ -12414,6 +12422,7 @@ function useTimer(type = "timeout") {
12414
12422
  }
12415
12423
  exports.MD5 = MD5;
12416
12424
  exports.buildTree = buildTree;
12425
+ exports.camelize = camelize;
12417
12426
  exports.createEnum = createEnum;
12418
12427
  exports.decrypt = decrypt;
12419
12428
  exports.decryptBase64 = decryptBase64;
@@ -12436,6 +12445,7 @@ exports.isEmpty = isEmpty;
12436
12445
  exports.isFunction = isFunction;
12437
12446
  exports.isObject = isObject;
12438
12447
  exports.isPromise = isPromise;
12448
+ exports.kebabCase = kebabCase;
12439
12449
  exports.noop = noop;
12440
12450
  exports.objToStr = objToStr;
12441
12451
  exports.resize = resize;