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

Made by Antonio Ramirez

@vltpkg/xdg

1.0.0-rc.13

@GitHub Actions

npmHomeRepoSnykSocket
Downloads:14607
$ npm install @vltpkg/xdg
DailyWeeklyMonthlyYearly

xdg

@vltpkg/xdg

Get appropriate data, cache, and config directories following the XDG spec, namespaced to a specific app-name subfolder.

Usage

import { XDG } from '@vltpkg/xdg'

// instantiate with the name of your thing.
const xdg = new XDG('vlt')

const cachePath = xdg.cache('some-path') // ~/.cache/vlt/some-path
const configFile = xdg.config('vlt.json') // ~/.config/vlt/vlt.json
const dataFolder = xdg.data('blah') // ~/.local/share/vlt/blah
const someState = xdg.state('foobar') // ~/.local/state/vlt/fooobar