JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 15754391
  • Score
    100M100P100Q233943F
  • License MIT

Get XDG Base Directory paths

Package Exports

  • xdg-basedir

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (xdg-basedir) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

xdg-basedir Build Status

Get XDG Base Directory paths

Install

$ npm install --save xdg-basedir

Usage

var xdgBasedir = require('xdg-basedir');

xdgBasedir.data;
//=> /home/sindresorhus/.local/share

xdgBasedir.config;
//=> /home/sindresorhus/.config

xdgBasedir.dataDirs
//=> ['/home/sindresorhus/.local/share', '/usr/local/share/', '/usr/share/']

API

.data

Directory for user specific data files.

.config

Directory for user specific configuration files.

.cache

Directory for user specific non-essential data files.

.runtime

Directory for user-specific non-essential runtime files and other file objects (such as sockets, named pipes, etc).

.dataDirs

Preference-ordered array of base directories to search for data files in addition to .data.

.configDirs

Preference-ordered array of base directories to search for configuration files in addition to .config.

License

MIT © Sindre Sorhus