Sha256: 804fb0c13d2ebd79f57cddfdda769f13217b423b2a7151e0c456cdecf635ae80

Contents?: true

Size: 1.01 KB

Versions: 78

Compression:

Stored size: 1.01 KB

Contents

/// <reference types="node" />

declare namespace pathKey {
	interface Options {
		/**
		Use a custom environment variables object. Default: [`process.env`](https://nodejs.org/api/process.html#process_process_env).
		*/
		readonly env?: {[key: string]: string | undefined};

		/**
		Get the PATH key for a specific platform. Default: [`process.platform`](https://nodejs.org/api/process.html#process_process_platform).
		*/
		readonly platform?: NodeJS.Platform;
	}
}

declare const pathKey: {
	/**
	Get the [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) environment variable key cross-platform.

	@example
	```
	import pathKey = require('path-key');

	const key = pathKey();
	//=> 'PATH'

	const PATH = process.env[key];
	//=> '/usr/local/bin:/usr/bin:/bin'
	```
	*/
	(options?: pathKey.Options): string;

	// TODO: Remove this for the next major release, refactor the whole definition to:
	// declare function pathKey(options?: pathKey.Options): string;
	// export = pathKey;
	default: typeof pathKey;
};

export = pathKey;

Version data entries

78 entries across 78 versions & 6 rubygems

Version Path
rapid_stack-0.1.1 templates/FrontEnd/node_modules/path-key/index.d.ts
rapid_stack-0.1.0 templates/FrontEnd/node_modules/path-key/index.d.ts
immosquare-cleaner-0.1.62 node_modules/path-key/index.d.ts
immosquare-cleaner-0.1.61 node_modules/path-key/index.d.ts
immosquare-cleaner-0.1.60 node_modules/path-key/index.d.ts
immosquare-cleaner-0.1.59 node_modules/path-key/index.d.ts
immosquare-cleaner-0.1.58 node_modules/path-key/index.d.ts
immosquare-cleaner-0.1.57 node_modules/path-key/index.d.ts
immosquare-cleaner-0.1.56 node_modules/path-key/index.d.ts
immosquare-cleaner-0.1.55 node_modules/path-key/index.d.ts
immosquare-cleaner-0.1.54 node_modules/path-key/index.d.ts
immosquare-cleaner-0.1.53 node_modules/path-key/index.d.ts
immosquare-cleaner-0.1.52 node_modules/path-key/index.d.ts
immosquare-cleaner-0.1.51 node_modules/path-key/index.d.ts
immosquare-cleaner-0.1.50 node_modules/path-key/index.d.ts
immosquare-cleaner-0.1.49 node_modules/path-key/index.d.ts
immosquare-cleaner-0.1.48 node_modules/path-key/index.d.ts
immosquare-cleaner-0.1.47 node_modules/path-key/index.d.ts
immosquare-cleaner-0.1.46 node_modules/path-key/index.d.ts
pcp-server-ruby-sdk-0.0.6 node_modules/path-key/index.d.ts