https://github.com/romainberger/has-touchbar
A small no-dependency module to tell you if the current machine has a physical touchbar or not.
https://github.com/romainberger/has-touchbar
electron touchbar
Last synced: 6 months ago
JSON representation
A small no-dependency module to tell you if the current machine has a physical touchbar or not.
- Host: GitHub
- URL: https://github.com/romainberger/has-touchbar
- Owner: romainberger
- License: mit
- Created: 2018-06-26T13:35:29.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-29T09:35:41.000Z (over 7 years ago)
- Last Synced: 2025-03-07T22:48:33.764Z (7 months ago)
- Topics: electron, touchbar
- Language: JavaScript
- Size: 1.95 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Has Touchbar [](https://www.npmjs.com/package/has-touchbar) [](https://www.npmjs.com/package/has-touchbar)
A small no-dependency module to tell you if the current machine has a physical touchbar or not.
**Note**: This module checks for *real physical* touchbar. Even if you run a touchbar simulator, if your mac does not have a touchbar, it will still return false.
## Installation
```shell
$ yarn add has-touchbar
```## Usage
```js
const hasTouchbar = require('has-touchbar')hasTouchbar().then(result => {
if (result) {
// this computer has a touchbar
}
else {
// no touchbar here
}
})
```