3 Star 0 Fork 0

mirrors_niksy/node-stdlib-browser

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
process.js 1.06 KB
一键复制 编辑 原始数据 按行查看 历史
Ivan Nikolić 提交于 4年前 . Add types
/* globals unknown */
import path from 'path';
function noop() {}
/**
* @param {unknown[]} arguments_
*/
function nextTick(...arguments_) {
const [function_] = arguments_;
arguments_.shift();
setTimeout(function () {
if (typeof function_ === 'function') {
function_.apply(null, arguments_);
}
}, 0);
}
/**
* @param {unknown} name
*/
function binding(name) {
throw new Error('No such module. (Possibly not yet loaded)');
}
const features = {};
const platformName = 'browser';
const pid = 1;
const browser = true;
const environment = {};
/** @type {string[]} */
const argv = [];
let cwd = '/';
function getCwd() {
return cwd;
}
/**
* @param {string} dir
*/
function getChdir(dir) {
cwd = path.resolve(dir, cwd);
}
export {
features,
nextTick,
pid,
browser,
environment as env,
argv,
binding,
getCwd as cwd,
getChdir as chdir,
noop as exit,
noop as kill,
noop as umask,
noop as dlopen,
noop as uptime,
noop as memoryUsage,
noop as uvCounters,
platformName as platform,
platformName as arch,
platformName as execPath,
platformName as title
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_niksy/node-stdlib-browser.git
git@gitee.com:mirrors_niksy/node-stdlib-browser.git
mirrors_niksy
node-stdlib-browser
node-stdlib-browser
master

搜索帮助