【文件属性】:
文件名称:computer-info:只需一行即可获取计算机信息
文件大小:12KB
文件格式:ZIP
更新时间:2021-04-02 12:25:45
JavaScript
我的电脑信息
只需一行即可获取计算机信息
安装
npm i mycomputer-info
:smiling_face_with_smiling_eyes:
用法
:purple_heart: :purple_heart: computer-info提供了两种获取信息的方法。 承诺和回调样式。
const { getComputerInfo } = require('mycomputer-info');
// Promise style
getComputerInfo(['category1', 'category2'[, categoryn])
.then(v => {
console.log(v);
})
.catch(e => {
console.log(e);
})
// Callback style
getComputerInfo(['category1', 'category2'[, categoryn],
(
【文件预览】:
computer-info-master
----test.js(682B)
----package.json(269B)
----.gitignore(2KB)
----lib()
--------mac.js(5KB)
--------utils.js(6KB)
--------win.js(10KB)
--------main.js(3KB)
----README.md(1KB)
----t.js(2KB)
----handler.js(6KB)