@pistachiojs/core 0.1.0-dev.1 → 0.1.0-dev.3
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 +43 -0
- package/dist/index.esm.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/strings/index.d.ts +6 -0
- package/dist/types/strings/to-camel-case.d.ts +6 -0
- package/dist/types/strings/to-capitalize.d.ts +6 -0
- package/dist/types/strings/to-kebab-case.d.ts +6 -0
- package/dist/types/strings/to-lower-case.d.ts +6 -0
- package/dist/types/strings/to-pascal-case.d.ts +6 -0
- package/dist/types/strings/to-sentence-case.d.ts +6 -0
- package/package.json +1 -1
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts a string to camel case.
|
|
3
|
+
* @param value - String value to camel case.
|
|
4
|
+
* @returns String value camel case.
|
|
5
|
+
*/
|
|
6
|
+
declare function toCamelCase(value: string): string;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Converts a string to capitalize.
|
|
10
|
+
* @param value - Value string to capitalize.
|
|
11
|
+
* @returns Value string capitalize.
|
|
12
|
+
*/
|
|
13
|
+
declare function toCapitalize(value: string): string;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Converts a string to kebab case.
|
|
17
|
+
* @param value - String value to kebab case.
|
|
18
|
+
* @returns String value kebab case.
|
|
19
|
+
*/
|
|
20
|
+
declare function toKebabCase(value: string): string;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Converts a string to lower case.
|
|
24
|
+
* @param value - String value to lower case.
|
|
25
|
+
* @returns String value lower case.
|
|
26
|
+
*/
|
|
27
|
+
declare function toLowerCase(value: string): string;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Converts a string to pascal case.
|
|
31
|
+
* @param value - String value to pascal case.
|
|
32
|
+
* @returns String value pascal case.
|
|
33
|
+
*/
|
|
34
|
+
declare function toPascalCase(value: string): string;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Converts a string to sentence case.
|
|
38
|
+
* @param value - String value to sentence case.
|
|
39
|
+
* @returns String value sentence case.
|
|
40
|
+
*/
|
|
41
|
+
declare function toSentenceCase(value: string): string;
|
|
42
|
+
|
|
43
|
+
export { toCamelCase, toCapitalize, toKebabCase, toLowerCase, toPascalCase, toSentenceCase };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(e){return e.length===0?e:e.replace(/[-_\s]+(.)?/g,(r,a)=>a?a.toUpperCase():"").replace(/^[A-Z]/,r=>r.toLowerCase())}function o(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}function n(e){return e.length===0?e:e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function s(e){return e.toLowerCase()}function c(e){return e.length===0?e:e.replace(/[-_\s]+(.)?/g,(r,a)=>a?a.toUpperCase():"").replace(/^[a-z]/,r=>r.toUpperCase())}function p(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}export{t as toCamelCase,o as toCapitalize,n as toKebabCase,s as toLowerCase,c as toPascalCase,p as toSentenceCase};
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function r(e){return e.length===0?e:e.replace(/[-_\s]+(.)?/g,(a,t)=>t?t.toUpperCase():"").replace(/^[A-Z]/,a=>a.toLowerCase())}function o(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}function s(e){return e.length===0?e:e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function n(e){return e.toLowerCase()}function C(e){return e.length===0?e:e.replace(/[-_\s]+(.)?/g,(a,t)=>t?t.toUpperCase():"").replace(/^[a-z]/,a=>a.toUpperCase())}function c(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}exports.toCamelCase=r,exports.toCapitalize=o,exports.toKebabCase=s,exports.toLowerCase=n,exports.toPascalCase=C,exports.toSentenceCase=c;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './strings';
|