Socket
Socket
Sign inDemoInstall

env-paths

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

env-paths - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

98

index.d.ts

@@ -1,45 +0,69 @@

export interface Options {
/**
* **Don't use this option unless you really have to!**
*
* Suffix appended to the project name to avoid name conflicts with native apps. Pass an empty string to disable it.
*
* @default 'nodejs'
*/
readonly suffix?: string;
declare namespace envPaths {
export interface Options {
/**
__Don't use this option unless you really have to!__
Suffix appended to the project name to avoid name conflicts with native apps. Pass an empty string to disable it.
@default 'nodejs'
*/
readonly suffix?: string;
}
export interface Paths {
/**
Directory for data files.
*/
readonly data: string;
/**
Directory for data files.
*/
readonly config: string;
/**
Directory for non-essential data files.
*/
readonly cache: string;
/**
Directory for log files.
*/
readonly log: string;
/**
Directory for temporary files.
*/
readonly temp: string;
}
}
export interface Paths {
declare const envPaths: {
/**
* Directory for data files.
*/
readonly data: string;
Get paths for storing things like data, config, cache, etc.
/**
* Directory for data files.
*/
readonly config: string;
@param name - Name of your project. Used to generate the paths.
@returns The paths to use for your project on current OS.
/**
* Directory for non-essential data files.
*/
readonly cache: string;
@example
```
import envPaths = require('env-paths');
/**
* Directory for log files.
*/
readonly log: string;
const paths = envPaths('MyApp');
/**
* Directory for temporary files.
*/
readonly temp: string;
}
paths.data;
//=> '/home/sindresorhus/.local/share/MyApp-nodejs'
/**
* Get paths for storing things like data, config, cache, etc.
*
* @param name - Name of your project. Used to generate the paths.
* @returns The paths to use for your project on current OS.
*/
export default function envPaths(name: string, options?: Options): Paths;
paths.config
//=> '/home/sindresorhus/.config/MyApp-nodejs'
```
*/
(name: string, options?: envPaths.Options): envPaths.Paths;
// TODO: Remove this for the next major release, refactor the whole definition to:
// declare function envPaths(name: string, options?: envPaths.Options): envPaths.Paths;
// export = envPaths;
default: typeof envPaths;
};
export = envPaths;

@@ -73,2 +73,3 @@ 'use strict';

module.exports = envPaths;
// TODO: Remove this for the next major release
module.exports.default = envPaths;
{
"name": "env-paths",
"version": "2.1.0",
"version": "2.2.0",
"description": "Get paths for storing things like data, config, cache, etc",

@@ -16,3 +16,3 @@ "license": "MIT",

"scripts": {
"test": "xo && ava && tsd-check"
"test": "xo && ava && tsd"
},

@@ -42,6 +42,6 @@ "files": [

"devDependencies": {
"ava": "^1.2.1",
"tsd-check": "^0.3.0",
"ava": "^1.4.1",
"tsd": "^0.7.1",
"xo": "^0.24.0"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc