Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
chore: loop change
changed the loop
  • Loading branch information
anikethsaha committed May 28, 2019
1 parent e583aab commit 818e43e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/generators/utils/plugins.ts
Expand Up @@ -43,11 +43,8 @@ export const replaceAt = (str: string, index: number, replace: string) : string
export const generatePluginName = (rawPluginName: string): string => {
let myPluginNameArray : string[];
myPluginNameArray = rawPluginName.split("-");
if(myPluginNameArray.length <= 1){}
else{
for (let i = 0; i < myPluginNameArray.length; i++) {
myPluginNameArray[i] = replaceAt(myPluginNameArray[i], 0, myPluginNameArray[i].charAt(0).toUpperCase());
}
for (let i = 0; i < myPluginNameArray.length && myPluginNameArray.length > 1 ; i++) {
myPluginNameArray[i] = replaceAt(myPluginNameArray[i], 0, myPluginNameArray[i].charAt(0).toUpperCase());
}
return myPluginNameArray.join("")
}

0 comments on commit 818e43e

Please sign in to comment.