Skip to content

Commit

Permalink
chore: pluginarrlength for length of the plugin
Browse files Browse the repository at this point in the history
assigned length of the plugin to  a constant
  • Loading branch information
anikethsaha committed May 30, 2019
1 parent 818e43e commit 4872416
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/generators/utils/plugins.ts
Expand Up @@ -43,7 +43,8 @@ export const replaceAt = (str: string, index: number, replace: string) : string
export const generatePluginName = (rawPluginName: string): string => {
let myPluginNameArray : string[];
myPluginNameArray = rawPluginName.split("-");
for (let i = 0; i < myPluginNameArray.length && myPluginNameArray.length > 1 ; i++) {
const pluginArrLength : number = myPluginNameArray.length;
for (let i = 0; i < pluginArrLength && pluginArrLength > 1 ; i++) {
myPluginNameArray[i] = replaceAt(myPluginNameArray[i], 0, myPluginNameArray[i].charAt(0).toUpperCase());
}
return myPluginNameArray.join("")
Expand Down

0 comments on commit 4872416

Please sign in to comment.