No description or website provided.
JavaScript CSS
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
test
vendor
.gitignore
.travis.yml
Gruntfile.js
MIT-LICENSE.txt
README.md
package.json

README.md

Bee.js

Build Status

Requirements

Base

Event

require("base/event", function(event) {
  var mediator = new event.Target();

  mediator.on("message:posted", function(ev) {
    if (ev.message.length == 0) ev.stop();

    console.log("New message posted: " + ev.message);
  });

  mediator.fire("message:posted", { message: "Hello world!" });
});

Attribute

require("base/util", "base/attribute", function(util, attr) {
  var container = {};

  util.mix(attr.Target, container);

  container.set("foo", "bar");

  container.attribute("distance", {
    default: "0",

    setter: function(val) {
      return val + "km";
    }
  });

  container.get("distance"); //=> "0km"

  container.keys(); //=> ["foo", "distance"]
});

Development and testing requirements

npm install
brew install phantomjs

License

MIT license: http://www.opensource.org/licenses/MIT