bev

1.0.0 • Public • Published

bev

Backbone.js's event mechanism as mixin

This is a tiny lib for a tiny code improvement.

Instead of

var _ = require('underscore');
var Backbone = require('backbone');
_.extend(myObjectOrPrototype, Backbone.Events);

do

require('bev').mixin(myObjectOrPrototype);

There are benefits to scoping down your modules this way. Backbone's event mechanism is arguably its strongest point. Prefer listenTo over on and you'll need event capable objects.

/bev/

    Package Sidebar

    Install

    npm i bev

    Weekly Downloads

    0

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • solsson