@trenskow/caseit 1.4.25 → 1.4.27

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,7 @@
1
+ {
2
+ "cSpell.words": [
3
+ "caseit",
4
+ "Kristian",
5
+ "trenskow"
6
+ ]
7
+ }
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
@@ -1,3 +1,11 @@
1
+ //
2
+ // index.js
3
+ // @trenskow/caseit
4
+ //
5
+ // Created by Kristian Trenskow on 2020/01/16
6
+ // For license see LICENSE.
7
+ //
8
+
1
9
  const separators = {
2
10
  'camel': '',
3
11
  'pascal': '',
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@trenskow/caseit",
3
- "version": "1.4.25",
3
+ "version": "1.4.27",
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.4.1",
29
- "globals": "^17.6.0"
29
+ "eslint": "^10.6.0",
30
+ "globals": "^17.7.0"
30
31
  }
31
32
  }