string-case-kit 1.0.0 → 1.0.1

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.
@@ -0,0 +1,47 @@
1
+ type DetectedCase = "camelCase" | "pascalCase" | "snakeCase" | "screamingSnakeCase" | "kebabCase" | "dotCase" | "unknown";
2
+ interface CountResult {
3
+ words: number;
4
+ chars: number;
5
+ }
6
+ interface AllCasesResult {
7
+ camelCase: string;
8
+ pascalCase: string;
9
+ snakeCase: string;
10
+ screamingSnakeCase: string;
11
+ kebabCase: string;
12
+ dotCase: string;
13
+ pathCase: string;
14
+ titleCase: string;
15
+ sentenceCase: string;
16
+ upperCase: string;
17
+ lowerCase: string;
18
+ }
19
+ interface ConverterAPI {
20
+ toCamelCase(): string;
21
+ toPascalCase(): string;
22
+ toSnakeCase(): string;
23
+ toScreamingSnakeCase(): string;
24
+ toKebabCase(): string;
25
+ toDotCase(): string;
26
+ toPathCase(): string;
27
+ toTitleCase(): string;
28
+ toSentenceCase(): string;
29
+ toUpperCase(): string;
30
+ toLowerCase(): string;
31
+ toggleCase(): string;
32
+ reverse(): string;
33
+ all(): AllCasesResult;
34
+ detect(): DetectedCase;
35
+ is: {
36
+ camelCase(): boolean;
37
+ pascalCase(): boolean;
38
+ snakeCase(): boolean;
39
+ kebabCase(): boolean;
40
+ };
41
+ custom(separator?: string): string;
42
+ slug(): string;
43
+ words(): string[];
44
+ count(): CountResult;
45
+ }
46
+ export declare function converter(input: string): ConverterAPI;
47
+ export {};
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "string-case-kit",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "main": "dist/index.js",
5
- "types": "dist/index.d.js",
5
+ "types": "dist/index.d.ts",
6
6
  "scripts": {
7
7
  "dev": "ts-node-dev --transpile-only src/index.ts",
8
8
  "build": "tsc",
package/tsconfig.json CHANGED
@@ -5,6 +5,7 @@
5
5
  "outDir": "./dist",
6
6
  "rootDir": "./src",
7
7
  "strict": true,
8
+ "declaration": true,
8
9
  "esModuleInterop": true,
9
10
  "moduleResolution": "node16",
10
11
  "forceConsistentCasingInFileNames": true,