Skip to content

Latest commit

 

History

History
64 lines (34 loc) · 1.2 KB

File metadata and controls

64 lines (34 loc) · 1.2 KB
hide_title true
custom_edit_url
pagination_prev
pagination_next

Home > @rushstack/node-core-library > PackageNameParser > tryParse

PackageNameParser.tryParse() method

This attempts to parse a package name that may include a scope component. The packageName must not be an empty string.

Signature:

tryParse(packageName: string): IParsedPackageNameOrError;

Parameters

Parameter

Type

Description

packageName

string

Returns:

IParsedPackageNameOrError

an IParsedPackageNameOrError structure whose error property will be nonempty if the string could not be parsed.

Remarks

This function will not throw an exception.