Skip to content

Commit 4872416

Browse files
committed
chore: pluginarrlength for length of the plugin
assigned length of the plugin to a constant
1 parent 818e43e commit 4872416

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/generators/utils/plugins.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ export const replaceAt = (str: string, index: number, replace: string) : string
4343
export const generatePluginName = (rawPluginName: string): string => {
4444
let myPluginNameArray : string[];
4545
myPluginNameArray = rawPluginName.split("-");
46-
for (let i = 0; i < myPluginNameArray.length && myPluginNameArray.length > 1 ; i++) {
46+
const pluginArrLength : number = myPluginNameArray.length;
47+
for (let i = 0; i < pluginArrLength && pluginArrLength > 1 ; i++) {
4748
myPluginNameArray[i] = replaceAt(myPluginNameArray[i], 0, myPluginNameArray[i].charAt(0).toUpperCase());
4849
}
4950
return myPluginNameArray.join("")

0 commit comments

Comments
 (0)