Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

mongoose-ratbird

0.0.0 • Public • Published

Mongoose Ratbird Preferences

Extend your Mongoose schemas with Ratbird notifier preferences.

Usage

Install with Node Package Manager:

npm install mongoose-ratbird

Invoke in you Mongoose schema:

var User = new mongoose.Schema({
  // ...
});
 
User.plugin(require('mongoose-ratbird'));

Now your mongoose Documents will have notification preferences that can be fed to the dispatch() method of an instance of ratbird.Notifier.

var notifier = ratbird.createNotifier(config);
// ...
notifier.dispatch({
  title: 'Some Notification',
  content: 'Something <em>really</em> important just happened!'
}, user._notifications);

Install

npm i mongoose-ratbird

DownloadsWeekly Downloads

1

Version

0.0.0

License

LGPLv3

Last publish

Collaborators

  • avatar