Skip to content

Main content

npm Package Tag Selector Split Tool

Compute npm package tag selector split from explicit bounded inputs.

Loading tool…

Description

Split a package selector at its required name-selector boundary.

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 package selector at its required name-selector boundary.

When to use this tool

Use npm Package Tag Selector Split when checking the stated package, Cargo or container-reference component.

How to use the tool and how it works

  1. Enter specifier. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read name, selector. Use the output convention below.

Split a package selector at its required name-selector boundary. Accept a scoped or unscoped nonwhitespace package-like name followed by @ and nonempty selector; return name and selector.1

Input fieldMeaning and unitsAccepted input
specifierSpecifierRequired. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
nameNameRequired. Text; maximum UTF-16 length 8192.
selectorSelectorRequired. Text; maximum UTF-16 length 8192.
json
{
  "input": {
    "specifier": "@scope/name@next"
  },
  "output": {
    "name": "@scope/name",
    "selector": "next"
  }
}

Limitations and assumptions

  • The selector is not necessarily a tag or valid range; no package resolution occurs.
  • 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

  1. Calculation and input contract: development/npm-package-tag-selector-split — tool.io

Similar or alternative tools