npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

@vltpkg/dss-breadcrumb

1.0.0-rc.13

@GitHub Actions

npmHomeRepoSnykSocket
Downloads:4887
$ npm install @vltpkg/dss-breadcrumb
DailyWeeklyMonthlyYearly

@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

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