vlt / docs

  • PricingBenchmarks (opens in new window)Community (opens in new window)Feedback
  • Overview
    • Overview
    • Reference
  • Usage
  1. Client
  2. /
  3. API Reference
  4. /
  5. @vltpkg/dss-breadcrumb

@vltpkg/dss-breadcrumb

@vltpkg/dss-breadcrumb

The Dependency Selector Syntax breadcrumb utilities used by the vlt client.

A returned "Breadcrumb" object is a data structure that contains a linked list of items that where parsed from a given Dependency Selector Syntax query string that can be used to navigate through a given graph.

Usage

JavaScript
import { parseBreadcrumb } from '@vltpkg/dss-breadcrumb'

// Parse a selector string into a breadcrumb
const breadcrumb = parseBreadcrumb(':root > #a')

// Use the breadcrumb to navigate through the query
console.log(breadcrumb.current.value) // :root
breadcrumb.next()
console.log(breadcrumb.current.value) // a

PreviousReferenceNextReference

On this page

  • Usage

Deploy your package on vlt.io

Publish scoped and private packages, manage organizations and access, and give every developer and CI environment a consistent source for public and private JavaScript dependencies.

Publish now