Socket
Book a DemoInstallSign in
Socket

@vltpkg/xdg

Package Overview
Dependencies
Maintainers
0
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vltpkg/xdg

platform-specific app directories following XDG spec

latest
Source
npmnpm
Version
1.0.0-rc.14
Version published
Maintainers
0
Created
Source

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

FAQs

Package last updated on 13 Jan 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts