3 Star 0 Fork 0

mirrors_niksy/node-stdlib-browser

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
console.js 401 Bytes
一键复制 编辑 原始数据 按行查看 历史
Ivan Nikolić 提交于 4年前 . Add types
const _console = globalThis.console ?? {};
const consoleApi = {
log: 1,
info: 1,
error: 1,
warn: 1,
dir: 1,
trace: 1,
assert: 1,
time: 1,
timeEnd: 1
};
/** @typedef {keyof consoleApi} ConsoleApi */
for (const property in consoleApi) {
if (!_console[/** @type {ConsoleApi} */ (property)]) {
_console[/** @type {ConsoleApi} */ (property)] = function () {};
}
}
export default _console;
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

搜索帮助