Skip to content

Instantly share code, notes, and snippets.

@AdamSaleh
Created October 15, 2012 13:43
Show Gist options
  • Save AdamSaleh/3892524 to your computer and use it in GitHub Desktop.
Save AdamSaleh/3892524 to your computer and use it in GitHub Desktop.
noerror
(def no-error?
"Returns true if the given notification is a 'success' or 'notification' type
notification (aka green notification in the UI)."
^{:type :serializable.fn/serializable-fn
:serializable.fn/source 'success?}
(fn [notif]
(and notif (some #{(:type notif)} [:success :message]))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment