@agentuity/core 0.0.62 → 0.0.63

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/index.d.ts CHANGED
@@ -3,6 +3,7 @@ export * from './json';
3
3
  export * from './logger';
4
4
  export * from './services';
5
5
  export * from './standard_schema';
6
+ export * from './string';
6
7
  export * from './typehelper';
7
8
  export * from './workbench-config';
8
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC"}
package/dist/index.js CHANGED
@@ -3,6 +3,7 @@ export * from './json';
3
3
  export * from './logger';
4
4
  export * from './services';
5
5
  export * from './standard_schema';
6
+ export * from './string';
6
7
  export * from './typehelper';
7
8
  export * from './workbench-config';
8
9
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * String utility functions for identifier conversion
3
+ */
4
+ /**
5
+ * Convert a string to camelCase
6
+ * @param str - The string to convert (can contain dashes, underscores, or spaces)
7
+ * @returns The camelCase version of the string
8
+ * @example
9
+ * toCamelCase('my-agent') // 'myAgent'
10
+ * toCamelCase('my_agent') // 'myAgent'
11
+ * toCamelCase('my agent') // 'myAgent'
12
+ * toCamelCase('my--multiple--dashes') // 'myMultipleDashes'
13
+ */
14
+ export declare function toCamelCase(str: string): string;
15
+ /**
16
+ * Convert a string to PascalCase
17
+ * @param str - The string to convert (can contain dashes, underscores, or spaces)
18
+ * @returns The PascalCase version of the string
19
+ * @example
20
+ * toPascalCase('my-agent') // 'MyAgent'
21
+ * toPascalCase('my_agent') // 'MyAgent'
22
+ * toPascalCase('my agent') // 'MyAgent'
23
+ */
24
+ export declare function toPascalCase(str: string): string;
25
+ //# sourceMappingURL=string.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../src/string.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAI/C;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAGhD"}
package/dist/string.js ADDED
@@ -0,0 +1,32 @@
1
+ /**
2
+ * String utility functions for identifier conversion
3
+ */
4
+ /**
5
+ * Convert a string to camelCase
6
+ * @param str - The string to convert (can contain dashes, underscores, or spaces)
7
+ * @returns The camelCase version of the string
8
+ * @example
9
+ * toCamelCase('my-agent') // 'myAgent'
10
+ * toCamelCase('my_agent') // 'myAgent'
11
+ * toCamelCase('my agent') // 'myAgent'
12
+ * toCamelCase('my--multiple--dashes') // 'myMultipleDashes'
13
+ */
14
+ export function toCamelCase(str) {
15
+ return str
16
+ .replace(/[-_\s]+(.)?/g, (_, char) => (char ? char.toUpperCase() : ''))
17
+ .replace(/^(.)/, (char) => char.toLowerCase());
18
+ }
19
+ /**
20
+ * Convert a string to PascalCase
21
+ * @param str - The string to convert (can contain dashes, underscores, or spaces)
22
+ * @returns The PascalCase version of the string
23
+ * @example
24
+ * toPascalCase('my-agent') // 'MyAgent'
25
+ * toPascalCase('my_agent') // 'MyAgent'
26
+ * toPascalCase('my agent') // 'MyAgent'
27
+ */
28
+ export function toPascalCase(str) {
29
+ const camel = toCamelCase(str);
30
+ return camel.charAt(0).toUpperCase() + camel.slice(1);
31
+ }
32
+ //# sourceMappingURL=string.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"string.js","sourceRoot":"","sources":["../src/string.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;GASG;AACH,MAAM,UAAU,WAAW,CAAC,GAAW;IACtC,OAAO,GAAG;SACR,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;SACtE,OAAO,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;AACjD,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,YAAY,CAAC,GAAW;IACvC,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;IAC/B,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACvD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentuity/core",
3
- "version": "0.0.62",
3
+ "version": "0.0.63",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Agentuity employees and contributors",
6
6
  "type": "module",
package/src/index.ts CHANGED
@@ -3,5 +3,6 @@ export * from './json';
3
3
  export * from './logger';
4
4
  export * from './services';
5
5
  export * from './standard_schema';
6
+ export * from './string';
6
7
  export * from './typehelper';
7
8
  export * from './workbench-config';
package/src/string.ts ADDED
@@ -0,0 +1,33 @@
1
+ /**
2
+ * String utility functions for identifier conversion
3
+ */
4
+
5
+ /**
6
+ * Convert a string to camelCase
7
+ * @param str - The string to convert (can contain dashes, underscores, or spaces)
8
+ * @returns The camelCase version of the string
9
+ * @example
10
+ * toCamelCase('my-agent') // 'myAgent'
11
+ * toCamelCase('my_agent') // 'myAgent'
12
+ * toCamelCase('my agent') // 'myAgent'
13
+ * toCamelCase('my--multiple--dashes') // 'myMultipleDashes'
14
+ */
15
+ export function toCamelCase(str: string): string {
16
+ return str
17
+ .replace(/[-_\s]+(.)?/g, (_, char) => (char ? char.toUpperCase() : ''))
18
+ .replace(/^(.)/, (char) => char.toLowerCase());
19
+ }
20
+
21
+ /**
22
+ * Convert a string to PascalCase
23
+ * @param str - The string to convert (can contain dashes, underscores, or spaces)
24
+ * @returns The PascalCase version of the string
25
+ * @example
26
+ * toPascalCase('my-agent') // 'MyAgent'
27
+ * toPascalCase('my_agent') // 'MyAgent'
28
+ * toPascalCase('my agent') // 'MyAgent'
29
+ */
30
+ export function toPascalCase(str: string): string {
31
+ const camel = toCamelCase(str);
32
+ return camel.charAt(0).toUpperCase() + camel.slice(1);
33
+ }