xdg-basedir
Advanced tools
Comparing version 3.0.0 to 4.0.0
12
index.js
@@ -5,14 +5,14 @@ 'use strict'; | ||
const home = os.homedir(); | ||
const env = process.env; | ||
const homeDirectory = os.homedir(); | ||
const {env} = process; | ||
exports.data = env.XDG_DATA_HOME || | ||
(home ? path.join(home, '.local', 'share') : null); | ||
(homeDirectory ? path.join(homeDirectory, '.local', 'share') : undefined); | ||
exports.config = env.XDG_CONFIG_HOME || | ||
(home ? path.join(home, '.config') : null); | ||
(homeDirectory ? path.join(homeDirectory, '.config') : undefined); | ||
exports.cache = env.XDG_CACHE_HOME || (home ? path.join(home, '.cache') : null); | ||
exports.cache = env.XDG_CACHE_HOME || (homeDirectory ? path.join(homeDirectory, '.cache') : undefined); | ||
exports.runtime = env.XDG_RUNTIME_DIR || null; | ||
exports.runtime = env.XDG_RUNTIME_DIR || undefined; | ||
@@ -19,0 +19,0 @@ exports.dataDirs = (env.XDG_DATA_DIRS || '/usr/local/share/:/usr/share/').split(':'); |
{ | ||
"name": "xdg-basedir", | ||
"version": "3.0.0", | ||
"description": "Get XDG Base Directory paths", | ||
"license": "MIT", | ||
"repository": "sindresorhus/xdg-basedir", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
}, | ||
"engines": { | ||
"node": ">=4" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"keywords": [ | ||
"xdg", | ||
"base", | ||
"directory", | ||
"dir", | ||
"basedir", | ||
"path", | ||
"data", | ||
"config", | ||
"cache", | ||
"linux", | ||
"unix", | ||
"spec" | ||
], | ||
"devDependencies": { | ||
"ava": "*", | ||
"require-uncached": "^1.0.2", | ||
"xo": "*" | ||
} | ||
"name": "xdg-basedir", | ||
"version": "4.0.0", | ||
"description": "Get XDG Base Directory paths", | ||
"license": "MIT", | ||
"repository": "sindresorhus/xdg-basedir", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
}, | ||
"engines": { | ||
"node": ">=8" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava && tsd" | ||
}, | ||
"files": [ | ||
"index.js", | ||
"index.d.ts" | ||
], | ||
"keywords": [ | ||
"xdg", | ||
"base", | ||
"directory", | ||
"basedir", | ||
"path", | ||
"data", | ||
"config", | ||
"cache", | ||
"linux", | ||
"unix", | ||
"spec" | ||
], | ||
"devDependencies": { | ||
"ava": "^1.4.1", | ||
"import-fresh": "^3.0.0", | ||
"tsd": "^0.7.2", | ||
"xo": "^0.24.0" | ||
} | ||
} |
@@ -9,3 +9,3 @@ # xdg-basedir [![Build Status](https://travis-ci.org/sindresorhus/xdg-basedir.svg?branch=master)](https://travis-ci.org/sindresorhus/xdg-basedir) | ||
``` | ||
$ npm install --save xdg-basedir | ||
$ npm install xdg-basedir | ||
``` | ||
@@ -36,11 +36,11 @@ | ||
Directory for user specific data files. | ||
Directory for user-specific data files. | ||
### .config | ||
Directory for user specific configuration files. | ||
Directory for user-specific configuration files. | ||
### .cache | ||
Directory for user specific non-essential data files. | ||
Directory for user-specific non-essential data files. | ||
@@ -47,0 +47,0 @@ ### .runtime |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
5693
5
82
1
4