@commitlint/ensure 20.2.0 → 20.4.0
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/lib/to-case.d.ts.map +1 -1
- package/lib/to-case.js +7 -11
- package/lib/to-case.js.map +1 -1
- package/package.json +4 -13
package/lib/to-case.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"to-case.d.ts","sourceRoot":"","sources":["../src/to-case.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"to-case.d.ts","sourceRoot":"","sources":["../src/to-case.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AASnD,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,GAAG,MAAM,CAyB5E"}
|
package/lib/to-case.js
CHANGED
|
@@ -1,26 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import kebabCase from "lodash.kebabcase";
|
|
3
|
-
import snakeCase from "lodash.snakecase";
|
|
4
|
-
import upperFirst from "lodash.upperfirst";
|
|
5
|
-
import startCase from "lodash.startcase";
|
|
1
|
+
import { toCamelCase, toKebabCase, toSnakeCase, toPascalCase, toTitleCase, } from "kasi";
|
|
6
2
|
export default function toCase(input, target) {
|
|
7
3
|
switch (target) {
|
|
8
4
|
case "camel-case":
|
|
9
|
-
return
|
|
5
|
+
return toCamelCase(input);
|
|
10
6
|
case "kebab-case":
|
|
11
|
-
return
|
|
7
|
+
return toKebabCase(input);
|
|
12
8
|
case "snake-case":
|
|
13
|
-
return
|
|
9
|
+
return toSnakeCase(input);
|
|
14
10
|
case "pascal-case":
|
|
15
|
-
return
|
|
11
|
+
return toPascalCase(input);
|
|
16
12
|
case "start-case":
|
|
17
|
-
return
|
|
13
|
+
return toTitleCase(input);
|
|
18
14
|
case "upper-case":
|
|
19
15
|
case "uppercase":
|
|
20
16
|
return input.toUpperCase();
|
|
21
17
|
case "sentence-case":
|
|
22
18
|
case "sentencecase":
|
|
23
|
-
return
|
|
19
|
+
return `${input.charAt(0).toUpperCase()}${input.slice(1)}`;
|
|
24
20
|
case "lower-case":
|
|
25
21
|
case "lowercase":
|
|
26
22
|
case "lowerCase": // Backwards compat config-angular v4
|
package/lib/to-case.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"to-case.js","sourceRoot":"","sources":["../src/to-case.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"to-case.js","sourceRoot":"","sources":["../src/to-case.ts"],"names":[],"mappings":"AACA,OAAO,EACN,WAAW,EACX,WAAW,EACX,WAAW,EACX,YAAY,EACZ,WAAW,GACX,MAAM,MAAM,CAAC;AAEd,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAa,EAAE,MAAsB;IACnE,QAAQ,MAAM,EAAE,CAAC;QAChB,KAAK,YAAY;YAChB,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;QAC3B,KAAK,YAAY;YAChB,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;QAC3B,KAAK,YAAY;YAChB,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;QAC3B,KAAK,aAAa;YACjB,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;QAC5B,KAAK,YAAY;YAChB,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;QAC3B,KAAK,YAAY,CAAC;QAClB,KAAK,WAAW;YACf,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC;QAC5B,KAAK,eAAe,CAAC;QACrB,KAAK,cAAc;YAClB,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5D,KAAK,YAAY,CAAC;QAClB,KAAK,WAAW,CAAC;QACjB,KAAK,WAAW,EAAE,qCAAqC;YACtD,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC;QAC5B;YACC,MAAM,IAAI,SAAS,CAAC,iCAAiC,MAAM,GAAG,CAAC,CAAC;IAClE,CAAC;AACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commitlint/ensure",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "20.
|
|
4
|
+
"version": "20.4.0",
|
|
5
5
|
"description": "Lint your commit messages",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "lib/index.d.ts",
|
|
@@ -37,20 +37,11 @@
|
|
|
37
37
|
"license": "MIT",
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@commitlint/utils": "^20.0.0",
|
|
40
|
-
"@types/lodash.camelcase": "^4.3.8",
|
|
41
|
-
"@types/lodash.kebabcase": "^4.1.8",
|
|
42
|
-
"@types/lodash.snakecase": "^4.1.8",
|
|
43
|
-
"@types/lodash.startcase": "^4.4.8",
|
|
44
|
-
"@types/lodash.upperfirst": "^4.3.8",
|
|
45
40
|
"glob": "^11.0.0"
|
|
46
41
|
},
|
|
47
42
|
"dependencies": {
|
|
48
|
-
"@commitlint/types": "^20.
|
|
49
|
-
"
|
|
50
|
-
"lodash.kebabcase": "^4.1.1",
|
|
51
|
-
"lodash.snakecase": "^4.1.1",
|
|
52
|
-
"lodash.startcase": "^4.4.0",
|
|
53
|
-
"lodash.upperfirst": "^4.3.1"
|
|
43
|
+
"@commitlint/types": "^20.4.0",
|
|
44
|
+
"kasi": "^2.0.1"
|
|
54
45
|
},
|
|
55
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "c68de5e24b010e38eac171f35ba18d31bb1fd3dd"
|
|
56
47
|
}
|