mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 15:37:46 +03:00
📝 Clean up Config::observe
This commit is contained in:
parent
333c5b66d1
commit
37241a7919
@ -222,11 +222,12 @@ class Config
|
||||
#
|
||||
# keyPath - The {String} name of the key to observe
|
||||
# options - An optional {Object} containing the `callNow` key.
|
||||
# callback - The {Function} that fires when the. It is given a single argument, `value`,
|
||||
# which is the new value of `keyPath`.
|
||||
# callback - The {Function} that fires when the value of the key is
|
||||
# changed. It is given a single argument, `value`, which is
|
||||
# the new value of `keyPath`.
|
||||
#
|
||||
# Returns an {Object} with the following keys:
|
||||
# :off - A {Function} that unobserves the `keyPath` with called.
|
||||
# :off - A {Function} that unobserves the `keyPath` when called.
|
||||
observe: (keyPath, options={}, callback) ->
|
||||
if _.isFunction(options)
|
||||
callback = options
|
||||
|
Loading…
Reference in New Issue
Block a user