Permalink
Browse files

Fixed bug, updated readme

  • Loading branch information...
1 parent b530ce0 commit 236115792f6f654dfdb120f1e9f4929d60b0b03a @olalonde committed Nov 20, 2012
Showing with 12 additions and 5 deletions.
  1. +11 −5 README.md
  2. +1 −0 index.js
View
@@ -1,7 +1,13 @@
+# Install
+
+```bash
+npm install notif
+```
+
# Usage
```javascript
-notif.send(actor, verb, object);
+notif.send(actor, verb [, object]);
```
Example:
@@ -54,15 +60,15 @@ notif.register('followed', function (notification, cb) {
});
});
-notify.register('logged in', function (notification) {
+notif.register('logged in', function (notification) {
});
-notify.register({ except: ['ignored user'] }, function (notification) {
- // save to database
+notif.register({ except: ['delete account'] }, function (notification) {
+ console.log('good news!');
});
-notify.register({ only: ['registered'] }, function (notification) {
+notif.register({ only: ['registered'] }, function (notification) {
// send email...
});
View
@@ -6,6 +6,7 @@ var Notification = function (actor, verb, object) {
this.actor = actor;
this.verb = verb;
this.object = object;
+ this.time = new Date();
};
var Notif = function() {

0 comments on commit 2361157

Please sign in to comment.