Skip to content

Commit e3decb2

Browse files
committed
Updates documentation
1 parent 860c06e commit e3decb2

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
### `v8.0.0`
4+
5+
Breaking changes:
6+
7+
- Expire time for notify-send is made to match macOS and Windows with default time of 10 seconds. The API is changed to take seconds as input and converting it to milliseconds before passing it on to notify-send. See [#341](https://github.com/mikaelbr/node-notifier/pull/341).
8+
39
### `v7.0.2`
410

511
- Updates dependencies

README.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,16 @@ notifier.notify(
7070
sound: true, // Only Notification Center or Windows Toasters
7171
wait: true // Wait with callback, until user action is taken against notification, does not apply to Windows Toasters as they always wait or notify-send as it does not support the wait option
7272
},
73-
function(err, response) {
73+
function (err, response) {
7474
// Response is response from notification
7575
}
7676
);
7777

78-
notifier.on('click', function(notifierObject, options, event) {
78+
notifier.on('click', function (notifierObject, options, event) {
7979
// Triggers if `wait: true` and user clicks notification
8080
});
8181

82-
notifier.on('timeout', function(notifierObject, options) {
82+
notifier.on('timeout', function (notifierObject, options) {
8383
// Triggers if `wait: true` and notification closes
8484
});
8585
```
@@ -179,7 +179,7 @@ notifier.notify(
179179
dropdownLabel: undefined, // String. Label to be used if multiple actions
180180
reply: false // Boolean. If notification should take input. Value passed as third argument in callback and event emitter.
181181
},
182-
function(error, response, metadata) {
182+
function (error, response, metadata) {
183183
console.log(response, metadata);
184184
}
185185
);
@@ -278,7 +278,7 @@ notifier.notify(
278278
remove: undefined, // Number. Refer to previously created notification to close.
279279
install: undefined // String (path, application, app id). Creates a shortcut <path> in the start menu which point to the executable <application>, appID used for the notifications.
280280
},
281-
function(error, response) {
281+
function (error, response) {
282282
console.log(response);
283283
}
284284
);
@@ -333,7 +333,7 @@ notifier.notify(
333333
wait: false, // Wait for User Action against Notification
334334
type: 'info' // The notification type : info | warn | error
335335
},
336-
function(error, response) {
336+
function (error, response) {
337337
console.log(response);
338338
}
339339
);
@@ -355,10 +355,12 @@ notifier.notify({
355355
message: 'Hello World',
356356
icon: __dirname + '/coulson.jpg',
357357

358+
wait: false, // Defaults no exipre time set. If true expire time of 5 seconds is used
359+
timeout: 10, // Alias for expire-time, time etc. Time before notify-send expires. Defaults to 10 seconds.
360+
358361
// .. and other notify-send flags:
359362
'app-name': 'node-notifier',
360363
urgency: undefined,
361-
time: undefined,
362364
category: undefined,
363365
hint: undefined
364366
});

0 commit comments

Comments
 (0)