@commitlint/ensure 20.4.0 → 20.4.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.
- package/lib/to-case.d.ts.map +1 -1
- package/lib/to-case.js +11 -7
- package/lib/to-case.js.map +1 -1
- package/package.json +12 -3
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;AAOnD,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,GAAG,MAAM,CAyB5E"}
|
package/lib/to-case.js
CHANGED
|
@@ -1,22 +1,26 @@
|
|
|
1
|
-
import
|
|
1
|
+
import camelCase from "lodash.camelcase";
|
|
2
|
+
import kebabCase from "lodash.kebabcase";
|
|
3
|
+
import snakeCase from "lodash.snakecase";
|
|
4
|
+
import upperFirst from "lodash.upperfirst";
|
|
5
|
+
import startCase from "lodash.startcase";
|
|
2
6
|
export default function toCase(input, target) {
|
|
3
7
|
switch (target) {
|
|
4
8
|
case "camel-case":
|
|
5
|
-
return
|
|
9
|
+
return camelCase(input);
|
|
6
10
|
case "kebab-case":
|
|
7
|
-
return
|
|
11
|
+
return kebabCase(input);
|
|
8
12
|
case "snake-case":
|
|
9
|
-
return
|
|
13
|
+
return snakeCase(input);
|
|
10
14
|
case "pascal-case":
|
|
11
|
-
return
|
|
15
|
+
return upperFirst(camelCase(input));
|
|
12
16
|
case "start-case":
|
|
13
|
-
return
|
|
17
|
+
return startCase(input);
|
|
14
18
|
case "upper-case":
|
|
15
19
|
case "uppercase":
|
|
16
20
|
return input.toUpperCase();
|
|
17
21
|
case "sentence-case":
|
|
18
22
|
case "sentencecase":
|
|
19
|
-
return
|
|
23
|
+
return upperFirst(input);
|
|
20
24
|
case "lower-case":
|
|
21
25
|
case "lowercase":
|
|
22
26
|
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,SAAS,MAAM,kBAAkB,CAAC;AACzC,OAAO,SAAS,MAAM,kBAAkB,CAAC;AACzC,OAAO,SAAS,MAAM,kBAAkB,CAAC;AACzC,OAAO,UAAU,MAAM,mBAAmB,CAAC;AAC3C,OAAO,SAAS,MAAM,kBAAkB,CAAC;AAEzC,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAa,EAAE,MAAsB;IACnE,QAAQ,MAAM,EAAE,CAAC;QAChB,KAAK,YAAY;YAChB,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC;QACzB,KAAK,YAAY;YAChB,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC;QACzB,KAAK,YAAY;YAChB,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC;QACzB,KAAK,aAAa;YACjB,OAAO,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;QACrC,KAAK,YAAY;YAChB,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC;QACzB,KAAK,YAAY,CAAC;QAClB,KAAK,WAAW;YACf,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC;QAC5B,KAAK,eAAe,CAAC;QACrB,KAAK,cAAc;YAClB,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC;QAC1B,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.
|
|
4
|
+
"version": "20.4.1",
|
|
5
5
|
"description": "Lint your commit messages",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "lib/index.d.ts",
|
|
@@ -37,11 +37,20 @@
|
|
|
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",
|
|
40
45
|
"glob": "^11.0.0"
|
|
41
46
|
},
|
|
42
47
|
"dependencies": {
|
|
43
48
|
"@commitlint/types": "^20.4.0",
|
|
44
|
-
"
|
|
49
|
+
"lodash.camelcase": "^4.3.0",
|
|
50
|
+
"lodash.kebabcase": "^4.1.1",
|
|
51
|
+
"lodash.snakecase": "^4.1.1",
|
|
52
|
+
"lodash.startcase": "^4.4.0",
|
|
53
|
+
"lodash.upperfirst": "^4.3.1"
|
|
45
54
|
},
|
|
46
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "e7ae28d1f71299cedcafe3360f376c93800b283a"
|
|
47
56
|
}
|