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