chore: update to standard 12
This commit is contained in:
parent
9e85bdb02c
commit
558fff69e7
198 changed files with 4455 additions and 2940 deletions
|
@ -1,4 +1,4 @@
|
|||
const {EventEmitter} = require('events')
|
||||
const { EventEmitter } = require('events')
|
||||
|
||||
let nextItemID = 1
|
||||
|
||||
|
@ -27,7 +27,7 @@ class TouchBar extends EventEmitter {
|
|||
throw new Error('Must specify options object as first argument')
|
||||
}
|
||||
|
||||
let {items, escapeItem} = options
|
||||
let { items, escapeItem } = options
|
||||
|
||||
// FIXME Support array as first argument, remove in 2.0
|
||||
if (Array.isArray(options)) {
|
||||
|
@ -83,7 +83,7 @@ class TouchBar extends EventEmitter {
|
|||
}
|
||||
|
||||
_addToWindow (window) {
|
||||
const {id} = window
|
||||
const { id } = window
|
||||
|
||||
// Already added to window
|
||||
if (this.windowListeners.hasOwnProperty(id)) return
|
||||
|
@ -195,7 +195,7 @@ TouchBar.TouchBarButton = class TouchBarButton extends TouchBarItem {
|
|||
super()
|
||||
if (config == null) config = {}
|
||||
this._addImmutableProperty('type', 'button')
|
||||
const {click, icon, iconPosition, label, backgroundColor} = config
|
||||
const { click, icon, iconPosition, label, backgroundColor } = config
|
||||
this._addLiveProperty('label', label)
|
||||
this._addLiveProperty('backgroundColor', backgroundColor)
|
||||
this._addLiveProperty('icon', icon)
|
||||
|
@ -213,7 +213,7 @@ TouchBar.TouchBarColorPicker = class TouchBarColorPicker extends TouchBarItem {
|
|||
super()
|
||||
if (config == null) config = {}
|
||||
this._addImmutableProperty('type', 'colorpicker')
|
||||
const {availableColors, change, selectedColor} = config
|
||||
const { availableColors, change, selectedColor } = config
|
||||
this._addLiveProperty('availableColors', availableColors)
|
||||
this._addLiveProperty('selectedColor', selectedColor)
|
||||
|
||||
|
@ -266,7 +266,7 @@ TouchBar.TouchBarSlider = class TouchBarSlider extends TouchBarItem {
|
|||
super()
|
||||
if (config == null) config = {}
|
||||
this._addImmutableProperty('type', 'slider')
|
||||
const {change, label, minValue, maxValue, value} = config
|
||||
const { change, label, minValue, maxValue, value } = config
|
||||
this._addLiveProperty('label', label)
|
||||
this._addLiveProperty('minValue', minValue)
|
||||
this._addLiveProperty('maxValue', maxValue)
|
||||
|
@ -294,7 +294,7 @@ TouchBar.TouchBarSegmentedControl = class TouchBarSegmentedControl extends Touch
|
|||
constructor (config) {
|
||||
super()
|
||||
if (config == null) config = {}
|
||||
const {segmentStyle, segments, selectedIndex, change, mode} = config
|
||||
const { segmentStyle, segments, selectedIndex, change, mode } = config
|
||||
this._addImmutableProperty('type', 'segmented_control')
|
||||
this._addLiveProperty('segmentStyle', segmentStyle)
|
||||
this._addLiveProperty('segments', segments || [])
|
||||
|
@ -314,8 +314,8 @@ TouchBar.TouchBarScrubber = class TouchBarScrubber extends TouchBarItem {
|
|||
constructor (config) {
|
||||
super()
|
||||
if (config == null) config = {}
|
||||
const {items, selectedStyle, overlayStyle, showArrowButtons, continuous, mode} = config
|
||||
let {select, highlight} = config
|
||||
const { items, selectedStyle, overlayStyle, showArrowButtons, continuous, mode } = config
|
||||
let { select, highlight } = config
|
||||
this._addImmutableProperty('type', 'scrubber')
|
||||
this._addLiveProperty('items', items)
|
||||
this._addLiveProperty('selectedStyle', selectedStyle || null)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue