Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 348 Bytes

notifications.coffee.md

File metadata and controls

18 lines (13 loc) · 348 Bytes

Notifications

Notifications for editors.

module.exports = (I={}, self) ->
  duration = 5000

  self.extend
    notifications: Observable []
    notify: (message) ->
      self.notifications.push message

      setTimeout ->
        self.notifications.remove message
      , duration

  return self