@cabloy/module-info 1.1.8 → 1.1.9
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/LICENSE +0 -0
- package/README.md +0 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +12 -1
- package/package.json +6 -6
package/LICENSE
CHANGED
|
File without changes
|
package/README.md
CHANGED
|
File without changes
|
package/dist/index.d.ts
CHANGED
|
@@ -4,4 +4,5 @@ export declare function parseInfoFromPath(pathName?: string | null): IModuleInfo
|
|
|
4
4
|
export declare function parseInfo(moduleName: string | undefined): IModuleInfo | undefined;
|
|
5
5
|
export declare function parseInfoPro(moduleName: string | undefined, projectMode: TypeProjectMode, projectEntityType: TypeProjectEntityType): IModuleInfo | undefined;
|
|
6
6
|
export declare function parseName(moduleUrl: any): string | undefined;
|
|
7
|
+
export declare function relativeNameToCapitalize(moduleName: string, firstCharToUpperCase: boolean): string;
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.parseName = exports.parseInfoPro = exports.parseInfo = exports.parseInfoFromPath = void 0;
|
|
17
|
+
exports.relativeNameToCapitalize = exports.parseName = exports.parseInfoPro = exports.parseInfo = exports.parseInfoFromPath = void 0;
|
|
18
18
|
__exportStar(require("./interface.js"), exports);
|
|
19
19
|
function parseInfoFromPath(pathName) {
|
|
20
20
|
if (!pathName)
|
|
@@ -131,4 +131,15 @@ function _parseName(moduleUrl, prefix) {
|
|
|
131
131
|
posB = moduleUrl.length;
|
|
132
132
|
return moduleUrl.substring(posA, posB);
|
|
133
133
|
}
|
|
134
|
+
function relativeNameToCapitalize(moduleName, firstCharToUpperCase) {
|
|
135
|
+
return moduleName
|
|
136
|
+
.split('-')
|
|
137
|
+
.map((name, index) => {
|
|
138
|
+
if (index === 0 && !firstCharToUpperCase)
|
|
139
|
+
return name;
|
|
140
|
+
return name.charAt(0).toUpperCase() + name.substring(1);
|
|
141
|
+
})
|
|
142
|
+
.join('');
|
|
143
|
+
}
|
|
144
|
+
exports.relativeNameToCapitalize = relativeNameToCapitalize;
|
|
134
145
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cabloy/module-info",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.9",
|
|
4
4
|
"description": "cabloy module-info",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -21,9 +21,6 @@
|
|
|
21
21
|
"dist/**/*.js",
|
|
22
22
|
"dist/**/*.d.ts"
|
|
23
23
|
],
|
|
24
|
-
"scripts": {
|
|
25
|
-
"lint": "eslint ."
|
|
26
|
-
},
|
|
27
24
|
"keywords": [
|
|
28
25
|
"egg",
|
|
29
26
|
"egg-born",
|
|
@@ -34,5 +31,8 @@
|
|
|
34
31
|
"dependencies": {
|
|
35
32
|
"stack-utils": "^2.0.6"
|
|
36
33
|
},
|
|
37
|
-
"gitHead": "2d40c063c115b230fdbc89f5a78b4412ebd0dfc9"
|
|
38
|
-
|
|
34
|
+
"gitHead": "2d40c063c115b230fdbc89f5a78b4412ebd0dfc9",
|
|
35
|
+
"scripts": {
|
|
36
|
+
"lint": "eslint ."
|
|
37
|
+
}
|
|
38
|
+
}
|