Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kfatehi/apple-system-profiler
wrapper around apple's system_profiler that parses the output
https://github.com/kfatehi/apple-system-profiler
Last synced: 3 months ago
JSON representation
wrapper around apple's system_profiler that parses the output
- Host: GitHub
- URL: https://github.com/kfatehi/apple-system-profiler
- Owner: kfatehi
- Created: 2016-09-07T23:16:40.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-06-06T21:56:20.000Z (over 2 years ago)
- Last Synced: 2024-10-28T16:21:29.993Z (3 months ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# apple-system-profiler
wrapper around apple's `system_profiler` that parses the output
## usage
```javascript
const {systemProfiler: asp} = require('./index.js')// Grab graphics, hardware, and memory info
// and parse them out as a JavaScript objectasp({
dataTypes: [
'SPDisplaysDataType',
'SPHardwareDataType',
'SPMemoryDataType'
]
/*
Other options (with defaults):
detailLevel: 'mini', // mini|basic|full
cwd: undefined,
maxBuffer: Infinity,
normalize: true // Set to `false` to get raw, untransformed JSON data
*/
}, (err, out) => {
if ( err ) throw err;
console.log(out);
});
```There is also `listDataTypes` method which resolves to the system's available
`dataTypes`.```js
const jsonArray = await listDataTypes();
```see `test.js`