@trenskow/caseit 1.4.24 → 1.4.26
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/.vscode/settings.json +7 -0
- package/index.d.ts +27 -0
- package/index.js +8 -0
- package/package.json +4 -3
package/index.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//
|
|
2
|
+
// index.js
|
|
3
|
+
// @trenskow/caseit
|
|
4
|
+
//
|
|
5
|
+
// Created by Kristian Trenskow on 2026/06/25
|
|
6
|
+
// For license see LICENSE.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
export type Supported = 'camel' | 'pascal' | 'snake' | 'domain' | 'kebab' | 'title' | 'http';
|
|
10
|
+
|
|
11
|
+
export interface ICaseIt {
|
|
12
|
+
(
|
|
13
|
+
input: string,
|
|
14
|
+
type?: Supported
|
|
15
|
+
): string;
|
|
16
|
+
words: (
|
|
17
|
+
input: string
|
|
18
|
+
) => string[];
|
|
19
|
+
detect: (
|
|
20
|
+
input: string
|
|
21
|
+
) => Supported | undefined;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare const caseit: ICaseIt;
|
|
25
|
+
|
|
26
|
+
export default caseit;
|
|
27
|
+
export const supported: Supported[];
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trenskow/caseit",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.26",
|
|
4
4
|
"description": "Small library for converting between different casing.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
7
|
+
"types": "index.d.ts",
|
|
7
8
|
"scripts": {
|
|
8
9
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
9
10
|
},
|
|
@@ -25,7 +26,7 @@
|
|
|
25
26
|
"devDependencies": {
|
|
26
27
|
"@eslint/eslintrc": "^3.3.5",
|
|
27
28
|
"@eslint/js": "^10.0.1",
|
|
28
|
-
"eslint": "^10.
|
|
29
|
-
"globals": "^17.
|
|
29
|
+
"eslint": "^10.5.0",
|
|
30
|
+
"globals": "^17.7.0"
|
|
30
31
|
}
|
|
31
32
|
}
|