process.cwd()

process.cwd() Returns the current working directory of the process. console.log(`Current directory: ${process.cwd()}`);

process.config

process.config An Object containing the JavaScript representation of the configure options that were used to compile the current Node.js executable. This is the same as the config.gypi file that was produced when running the ./configure script. An example of the possible output looks like: { target_defaults: { cflags: [], default_configuration: 'Release', defines: [], include_dirs: [], libraries: [] }, variables: { host_arch: 'x64', node_install_npm: 't

process.argv

process.argv An array containing the command line arguments. The first element will be 'node', the second element will be the name of the JavaScript file. The next elements will be any additional command line arguments. // print process.argv process.argv.forEach((val, index, array) => { console.log(`${index}: ${val}`); }); This will generate: $ node process-2.js one two=three four 0: node 1: /Users/mjr/work/node/process-2.js 2: one 3: two=three 4: four

process.arch

process.arch What processor architecture you're running on: 'arm', 'ia32', or 'x64'. console.log('This processor architecture is ' + process.arch);

process.abort()

process.abort() This causes Node.js to emit an abort. This will cause Node.js to exit and generate a core file.

pipe event (stream.Writable)

Stability: 2 - Stable A stream is an abstract interface implemented by various objects in Node.js. For example a request to an HTTP server is a stream, as is process.stdout. Streams are readable, writable, or both. All streams are instances of EventEmitter. You can load the Stream base classes by doing require('stream'). There are base classes provided for Readable streams, Writable streams, Duplex streams, and Transform streams. This document is split up into 3 sections: The first section e

path.win32

path.win32 Provide access to aforementioned path methods but always interact in a win32 compatible way.

pause event (Readline)

Event: 'pause' function () {} Emitted whenever the input stream is paused. Also emitted whenever the input stream is not paused and receives the SIGCONT event. (See events SIGTSTP and SIGCONT) Example of listening for 'pause': rl.on('pause', () => { console.log('Readline paused.'); });

path.sep

path.sep The platform-specific file separator. '\\' or '/'. An example on *nix: 'foo/bar/baz'.split(path.sep) // returns ['foo', 'bar', 'baz'] An example on Windows: 'foo\\bar\\baz'.split(path.sep) // returns ['foo', 'bar', 'baz']

path.resolve()

path.resolve([from ...], to) Resolves to to an absolute path. If to isn't already absolute from arguments are prepended in right to left order, until an absolute path is found. If after using all from paths still no absolute path is found, the current working directory is used as well. The resulting path is normalized, and trailing slashes are removed unless the path gets resolved to the root directory. Non-string from arguments are ignored. Another way to think of it is as a sequence of cd c