Nascent Prototype Metaverse

    notier

    1.1.0 • Public • Published

    notier

    Simple promise enabled wrapper around notification library notie.

    Install

    $ npm i -S notier
    # or 
    $ yarn add notier

    Use

    var notier = require('notier')
     
    // general notifier
    notier('Hi there!')
     
    // success type notification
    notier.success('Item acquired successfully')
     
    // error type notification
    notier.error('Could not find any results!' )
     
    // confirm
    notier.confirm('Are you sure? This cannot be undone.')
      .then(data => {
        // user accepted
      })
      .catch(() => {
        // user rejected
      })

    API

    notier(message, opts)
    message is self explanatory. opts is notie options. Returns promise.

    notier.info(message, opts)
    Info type notification.

    notier.success(message, opts)
    Success type notification.

    notier.warning(message, opts)
    Warning type notification.

    notier.error(message, opts)
    Error type notification.

    notier.confirm(message, opts)
    Confirm notification. Returned promise will resolve on accept.

    notier.setTexts({ submit, cancel })
    Set global texts to be used in actions.

    Author

    Ismail Demirbilek - @dbtek

    Keywords

    none

    Install

    npm i notier

    DownloadsWeekly Downloads

    3

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    5.13 kB

    Total Files

    5

    Last publish

    Collaborators

    • dbtek