Skip to content

Commit 93fd098

Browse files
committed
feat: added force option
1 parent dc811f5 commit 93fd098

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/index.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import * as NodeNotifier from 'node-notifier'
22

3-
export function notify(notification?: NodeNotifier.Notification, callback?: NodeNotifier.NotificationCallback) {
4-
if (['0', 'false'].includes(process.env.HEROKU_NOTIFICATIONS!)) return
3+
export interface Notification extends NodeNotifier.Notification {
4+
force?: boolean
5+
}
6+
7+
export function notify(notification: Notification = {}, callback?: NodeNotifier.NotificationCallback) {
8+
if (!notification.force || ['0', 'false'].includes(process.env.HEROKU_NOTIFICATIONS!)) return
59
return NodeNotifier.notify(notification, callback)
610
}

0 commit comments

Comments
 (0)