Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

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

Something went wrong with that request. Please try again.