Skip to content
indefinidoPublic

About

Aspect oriented programming mixin

Resources

Stars

0 stars

Watchers

2 watching

Forks

Repository files navigation

Advisable

Aspect oriented programming mixin

Installation

$ component install indefinido/advisable

API

  advisable = require('advisable').mixin;

  arthur = advisable({
    name     : function full_name () { return this.firstname + " " + this.surname; },
    firstname: "Arthur Philip",
    surname  : "Dent",
    species  : "Humam"
  });

  arthur.before('name', function () {
    console.log('excuted before arthur.name()');
  });

  arthur.after('name', function () {
    console.log('excuted after arthur.name()');
  });

  // You must manually call the actual function or
  // the callback chain will fail.
  arthur.around('name', function (full_name) {
    console.log('excuted before arthur.name()');
	full_name();
    console.log('excuted after arthur.name()');
  });

TODO

License

WTFPL

Credits

Built upon the lovely coffeescript language

About

Aspect oriented programming mixin

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages