@skmtc/core 0.0.414 → 0.0.416

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.
@@ -1,9 +1,9 @@
1
+ import "../_dnt.polyfills.js";
1
2
  export declare const capitalize: (str: string) => string;
2
3
  export declare const decapitalize: (str: string) => string;
3
- type CamelCaseArgs = {
4
- str: string;
4
+ type CamelCaseOptions = {
5
5
  upperFirst?: boolean;
6
6
  };
7
- export declare const camelCase: ({ str, upperFirst }: CamelCaseArgs) => string;
7
+ export declare const camelCase: (str: string, { upperFirst }?: CamelCaseOptions) => string;
8
8
  export {};
9
9
  //# sourceMappingURL=strings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../../src/helpers/strings.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,QAAS,MAAM,KAAG,MAExC,CAAA;AAED,eAAO,MAAM,YAAY,QAAS,MAAM,KAAG,MAE1C,CAAA;AAED,KAAK,aAAa,GAAG;IACnB,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,SAAS,wBAAyB,aAAa,KAAG,MAY9D,CAAA"}
1
+ {"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../../src/helpers/strings.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,eAAO,MAAM,UAAU,QAAS,MAAM,KAAG,MAExC,CAAA;AAED,eAAO,MAAM,YAAY,QAAS,MAAM,KAAG,MAE1C,CAAA;AAED,KAAK,gBAAgB,GAAG;IACtB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,SAAS,QAAS,MAAM,mBAAkB,gBAAgB,KAAQ,MAY9E,CAAA"}
@@ -1,10 +1,11 @@
1
+ import "../_dnt.polyfills.js";
1
2
  export const capitalize = (str) => {
2
3
  return str.charAt(0).toUpperCase() + str.slice(1);
3
4
  };
4
5
  export const decapitalize = (str) => {
5
6
  return str.charAt(0).toLocaleLowerCase() + str.slice(1);
6
7
  };
7
- export const camelCase = ({ str, upperFirst }) => {
8
+ export const camelCase = (str, { upperFirst } = {}) => {
8
9
  let doCapitalize = Boolean(upperFirst);
9
10
  return str.replace(/[^a-zA-Z0-9]+([a-zA-Z0-9]+)/g, (_, matched) => {
10
11
  if (doCapitalize) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skmtc/core",
3
- "version": "0.0.414",
3
+ "version": "0.0.416",
4
4
  "main": "./script/mod.js",
5
5
  "module": "./esm/mod.js",
6
6
  "exports": {
@@ -36,6 +36,10 @@
36
36
  "import": "./esm/helpers/toResolvedArtifactPath.js",
37
37
  "require": "./script/helpers/toResolvedArtifactPath.js"
38
38
  },
39
+ "./strings": {
40
+ "import": "./esm/helpers/strings.js",
41
+ "require": "./script/helpers/strings.js"
42
+ },
39
43
  "./Settings": {
40
44
  "import": "./esm/types/Settings.js",
41
45
  "require": "./script/types/Settings.js"
@@ -1,9 +1,9 @@
1
+ import "../_dnt.polyfills.js";
1
2
  export declare const capitalize: (str: string) => string;
2
3
  export declare const decapitalize: (str: string) => string;
3
- type CamelCaseArgs = {
4
- str: string;
4
+ type CamelCaseOptions = {
5
5
  upperFirst?: boolean;
6
6
  };
7
- export declare const camelCase: ({ str, upperFirst }: CamelCaseArgs) => string;
7
+ export declare const camelCase: (str: string, { upperFirst }?: CamelCaseOptions) => string;
8
8
  export {};
9
9
  //# sourceMappingURL=strings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../../src/helpers/strings.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,QAAS,MAAM,KAAG,MAExC,CAAA;AAED,eAAO,MAAM,YAAY,QAAS,MAAM,KAAG,MAE1C,CAAA;AAED,KAAK,aAAa,GAAG;IACnB,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,SAAS,wBAAyB,aAAa,KAAG,MAY9D,CAAA"}
1
+ {"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../../src/helpers/strings.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,eAAO,MAAM,UAAU,QAAS,MAAM,KAAG,MAExC,CAAA;AAED,eAAO,MAAM,YAAY,QAAS,MAAM,KAAG,MAE1C,CAAA;AAED,KAAK,gBAAgB,GAAG;IACtB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,SAAS,QAAS,MAAM,mBAAkB,gBAAgB,KAAQ,MAY9E,CAAA"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.camelCase = exports.decapitalize = exports.capitalize = void 0;
4
+ require("../_dnt.polyfills.js");
4
5
  const capitalize = (str) => {
5
6
  return str.charAt(0).toUpperCase() + str.slice(1);
6
7
  };
@@ -9,7 +10,7 @@ const decapitalize = (str) => {
9
10
  return str.charAt(0).toLocaleLowerCase() + str.slice(1);
10
11
  };
11
12
  exports.decapitalize = decapitalize;
12
- const camelCase = ({ str, upperFirst }) => {
13
+ const camelCase = (str, { upperFirst } = {}) => {
13
14
  let doCapitalize = Boolean(upperFirst);
14
15
  return str.replace(/[^a-zA-Z0-9]+([a-zA-Z0-9]+)/g, (_, matched) => {
15
16
  if (doCapitalize) {