node os env reader
node-os-env-reader.js
#!/usr/bin/env node
"use strict";
/**
*
* @author xgqfrms
* @license MIT
* @copyright xgqfrms
* @created 2018-01-01
* @modified
*
* @description node-os-env-reader.js
* @difficulty Easy Medium Hard
* @complexity O(n)
* @augments
* @example
* @link https://github.com/xgqfrms/apis/commit/4b656cb4aabbb3d7a6d81bcd8010eccb59cc3243
* @link https://github.com/YMFE/yapi/issues/959
* @link https://gist.github.com/xgqfrms/a5dd73b346e1f42087f2e77fc4187181
* @solutions
*
* @best_solutions
*
*/
const log = console.log;
const {
arch,
platform,
// env,
} = process;
log(`process.arch =`, arch);
// x64
log(`process.platform =`, platform);
// win32
// linux
const {
OS,
} = process.env;
log(`process.env.OS =`, OS);
// Windows_NT
// undefined
/*
process.arch = x64
process.platform = darwin
process.env.OS = undefined
*/
log(`
process.env =`, process.env);
log(`
process =`, process);
https://github.com/YMFE/yapi/issues/959
https://github.com/xgqfrms/apis
https://www.cnblogs.com/xgqfrms/p/10696146.html
refs
©xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!