Skip to content

Commit 81ba3db

Browse files
committed
Mark function as static
1 parent 3d90b8e commit 81ba3db

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Nodejs/Product/ProjectWizard/NodejsPackageParametersExtension.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class NodejsPackageParametersExtension : IWizard {
2828
/// Normalize a project name to be a valid Npm package name.
2929
/// </summary>
3030
/// <param name="projectName">Name of a VS project.</param>
31-
private string GetNpmSafeProjectName(string projectName) {
31+
private static string NormalizeNpmPackageName(string projectName) {
3232
// Remove all leading url-invalid, underscore, and period characters
3333
var npmProjectNameTransform = Regex.Replace(projectName, "^[^a-zA-Z0-9-~]*", string.Empty);
3434

@@ -43,7 +43,7 @@ private string GetNpmSafeProjectName(string projectName) {
4343

4444
public void RunStarted(object automationObject, Dictionary<string, string> replacementsDictionary, WizardRunKind runKind, object[] customParams) {
4545
var projectName = replacementsDictionary["$projectname$"];
46-
replacementsDictionary.Add("$npmsafeprojectname$", GetNpmSafeProjectName(projectName));
46+
replacementsDictionary.Add("$npmsafeprojectname$", NormalizeNpmPackageName(projectName));
4747
}
4848

4949
public void ProjectFinishedGenerating(EnvDTE.Project project) {

0 commit comments

Comments
 (0)