mirror of https://github.com/nodejs/node.git
Implement `process.arch` to get a String of the current processor architecture, with docs.
parent
a2328dc73c
commit
b1be5409bd
|
@ -271,6 +271,13 @@ The PID of the process.
|
|||
Getter/setter to set what is displayed in 'ps'.
|
||||
|
||||
|
||||
### process.arch
|
||||
|
||||
What processor architecture you're running on. `'arm'`, `'ia32'`, etc.
|
||||
|
||||
console.log('This processor architecture is ' + process.arch);
|
||||
|
||||
|
||||
### process.platform
|
||||
|
||||
What platform you're running on. `'linux2'`, `'darwin'`, etc.
|
||||
|
|
|
@ -1992,6 +1992,9 @@ Handle<Object> SetupProcessObject(int argc, char *argv[]) {
|
|||
|
||||
|
||||
|
||||
// process.arch
|
||||
process->Set(String::NewSymbol("arch"), String::New(ARCH));
|
||||
|
||||
// process.platform
|
||||
process->Set(String::NewSymbol("platform"), String::New(PLATFORM));
|
||||
|
||||
|
|
Loading…
Reference in New Issue