JSPM

display-notification

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 359768
  • Score
    100M100P100Q173748F
  • License MIT

Display a notification (OS X 10.9+)

Package Exports

  • display-notification

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (display-notification) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

display-notification Build Status

Display a notification (OS X 10.9+)

Install

$ npm install --save display-notification

Usage

var displayNotification = require('display-notification');

displayNotification({
    title: 'Unicorns',
    subtitle: 'Rainbows',
    text: 'Cake',
    sound: 'Bottle'
});

API

displayNotification(options, callback)

Everything is a string and optional, except you need to supply at least a title or text.

The icon cannot be changed.

options

title
subtitle
text
sound

The name of a sound located in ~/Library/Sounds or /System/Library/Sounds:

Basso Blow Bottle Frog Funk Glass Hero Morse Ping Pop Purr Sosumi Submarine Tink

CLI

$ npm install --global display-notification
$ display-notification --help

  Usage
    display-notification <text> [--title <>] [--subtitle <>] [--sound <>]
    echo <text> | display-notification [--title <>] [--subtitle <>] [--sound <>]

  Example
    display-notification 'I love unicorns' --title 'Unicorns'

License

MIT © Sindre Sorhus