Kaluma
Search…
Process
  • The process object provide the information about the process.

Object: process

process.arch

  • <string>ex) 'arm', 'x64', ...
The system architecture which the Kaluma firmware is compiled.

process.platform

  • <string>ex) 'linux', 'darwin', 'unknown', ...
The OS system which the Kaluma firmware is running.

process.version

  • <string>version number, semver format. ex) '0.1.0', ...

process.builtin_modules

  • <string[]>array of built-in module names.
There's no need to use require before using the built-in module.

process.getBuiltinModule(builtin_module_name)

  • builtin_module_name <string>
  • Returns: <function>
load the builtin module and return the module as a function

process.binding(native_module_name)

  • native_module_name <string>
  • Returns: <function>
load a native module
Has properties : binding has native module names as properties

process.memoryUsage()

  • Returns: <object>
    • heapTotal <number>
    • heapUsed <number>
    • heapPeak <number>
Returns an object describing memory usage.

process.stdin

Returns a stream object connected to standard input.
1
// reads 100 bytes from standard in
2
let size = 0;
3
while (size < 100) {
4
let chunk = process.stdin.read();
5
if (chunk) {
6
let s = String.fromCharCode.apply(null, chunk);
7
console.log('data = ', s);
8
size += chunk.length;
9
}
10
}
Copied!

process.stdout

Returns a stream object connected to standard output.
1
let data = new Uint8Array([65, 66, 67, 68, 69]); // "ABCDE"
2
process.stdout.write(data);
Copied!
Last modified 21d ago