Skip to content

Commit 7b94266

Browse files
committed
Explicitly require process
1 parent d9d2c79 commit 7b94266

File tree

14 files changed

+85
-25
lines changed

14 files changed

+85
-25
lines changed

lib/node_modules/@stdlib/process/argv/lib/main.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@
1818

1919
'use strict';
2020

21+
// MODULES //
22+
23+
var proc = require( 'process' );
24+
25+
26+
// MAIN //
27+
2128
/**
2229
* An array containing command-line arguments passed when launching the calling process.
2330
*
@@ -28,7 +35,7 @@
2835
* console.log( ARGV );
2936
* // => [...]
3037
*/
31-
var ARGV = process.argv;
38+
var ARGV = proc.argv;
3239

3340

3441
// EXPORTS //

lib/node_modules/@stdlib/process/chdir/lib/main.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818

1919
'use strict';
2020

21+
// MODULES //
22+
23+
var proc = require( 'process' );
24+
25+
2126
// MAIN //
2227

2328
/**
@@ -34,7 +39,7 @@
3439
*/
3540
function chdir( path ) {
3641
try {
37-
process.chdir( path );
42+
proc.chdir( path );
3843
} catch ( err ) {
3944
return err;
4045
}

lib/node_modules/@stdlib/process/cwd/lib/main.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818

1919
'use strict';
2020

21+
// MODULES //
22+
23+
var proc = require( 'process' );
24+
25+
2126
// MAIN //
2227

2328
/**
@@ -27,10 +32,10 @@
2732
*
2833
* @example
2934
* var dir = cwd();
30-
* // returns '/path/to/current/working/directory'
35+
* // e.g., returns '/path/to/current/working/directory'
3136
*/
3237
function cwd() {
33-
return process.cwd();
38+
return proc.cwd();
3439
}
3540

3641

lib/node_modules/@stdlib/process/env/lib/main.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@
1818

1919
'use strict';
2020

21+
// MODULES //
22+
23+
var proc = require( 'process' );
24+
25+
26+
// MAIN //
27+
2128
/**
2229
* An object containing the user environment.
2330
*
@@ -27,7 +34,7 @@
2734
* @example
2835
* console.dir( ENV );
2936
*/
30-
var ENV = process.env; // eslint-disable-line no-process-env
37+
var ENV = proc.env;
3138

3239

3340
// EXPORTS //

lib/node_modules/@stdlib/process/getegid/lib/native.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@
1818

1919
'use strict';
2020

21+
// MODULES //
22+
23+
var proc = require( 'process' );
24+
25+
26+
// MAIN //
27+
2128
/**
2229
* Returns the effective numeric group identity of the calling process.
2330
*
@@ -29,7 +36,7 @@
2936
* @example
3037
* var gid = getegid();
3138
*/
32-
var getegid = process.getegid;
39+
var getegid = proc.getegid;
3340

3441

3542
// EXPORTS //

lib/node_modules/@stdlib/process/geteuid/lib/native.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@
1818

1919
'use strict';
2020

21+
// MODULES //
22+
23+
var proc = require( 'process' );
24+
25+
26+
// MAIN //
27+
2128
/**
2229
* Returns the effective numeric user identity of the calling process.
2330
*
@@ -29,7 +36,7 @@
2936
* @example
3037
* var uid = geteuid();
3138
*/
32-
var geteuid = process.geteuid;
39+
var geteuid = proc.geteuid;
3340

3441

3542
// EXPORTS //

lib/node_modules/@stdlib/process/getgid/lib/native.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@
1818

1919
'use strict';
2020

21+
// MODULES //
22+
23+
var proc = require( 'process' );
24+
25+
26+
// MAIN //
27+
2128
/**
2229
* Returns the numeric group identity of the calling process.
2330
*
@@ -29,7 +36,7 @@
2936
* @example
3037
* var gid = getgid();
3138
*/
32-
var getgid = process.getgid;
39+
var getgid = proc.getgid;
3340

3441

3542
// EXPORTS //

lib/node_modules/@stdlib/process/getuid/lib/native.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@
1818

1919
'use strict';
2020

21+
// MODULES //
22+
23+
var proc = require( 'process' );
24+
25+
26+
// MAIN //
27+
2128
/**
2229
* Returns the numeric user identity of the calling process.
2330
*
@@ -29,7 +36,7 @@
2936
* @example
3037
* var uid = getuid();
3138
*/
32-
var getuid = process.getuid;
39+
var getuid = proc.getuid;
3340

3441

3542
// EXPORTS //

lib/node_modules/@stdlib/process/node-version/lib/process.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818

1919
'use strict';
2020

21+
// MODULES //
22+
23+
var proc = require( 'process' );
24+
25+
2126
// EXPORTS //
2227

23-
module.exports = process;
28+
module.exports = proc;

lib/node_modules/@stdlib/process/read-stdin/lib/browser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ var isFunction = require( '@stdlib/assert/is-function' );
3636
* @example
3737
* function onRead( error ) {
3838
* if ( error ) {
39-
* throw error;
39+
* return console.error( error.message );
4040
* }
4141
* }
4242
*

0 commit comments

Comments
 (0)