Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/node-core-library > PackageName > getScope

PackageName.getScope() method

The parsed NPM scope, or an empty string if there was no scope. The scope value will always include the at-sign.

Signature:

static getScope(packageName: string): string;

Parameters

ParameterTypeDescription
packageNamestring

Returns:

string

Remarks

For example, if the parsed input was "@scope/example", then scope would be "@scope".