Description
Split a restricted lowercase npm scoped package name.
Package and container references combine names, selectors, conditions and platform metadata. A restricted lexical split can preserve these parts without validating registry identity, available targets, dependency graphs or runtime resolution.
Split a restricted lowercase npm scoped package name.
When to use this tool
Use Development: npm Scoped Name Components when checking the stated package, Cargo or container-reference component.
How to use the tool and how it works
- Enter name. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read result. Expand result to inspect the returned fields.
Split a restricted lowercase npm scoped package name. Require @scope/package with ASCII lowercase alphanumeric beginnings and subsequent lowercase digits/dot/underscore/hyphen, total length <= 214.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| name | Name | Required. Text. Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Returned object; expand its named members below. | Required. Object. |
| result.scope | Scope | Calculated result member: string. |
| result.packageName | Package Name | Calculated result member: string. |
{
"input": {
"name": "@example/widget"
},
"output": {
"result": {
"scope": "example",
"packageName": "widget"
}
}
} Limitations and assumptions
- This is local syntax validation, not a registry lookup or all package-manager naming rules.
- Outputs are nested inside result. Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Use the relevant package manager, runtime or registry against the actual project for complete resolution and validation.
References
Similar or alternative tools
- npm Package Name Scope Boundary
Split scope and package under a restricted npm-style name grammar.
- Development: npm Alias Specifier Components
Parse one restricted npm alias specifier.