Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Prototypical utilities for Object Orientation / Composition
JavaScript Python Shell
Branch: master


latest commit b22ca120df
(Soreλ\a) authored


Build Status NPM version Dependencies Status stable

browser support

Boo provides utilities to structure a program by means of prototypical object orientation and object composition, in an easy way. It provides you with inheritance, composition and mixin facilities, all packaged in a nice API.


var Animal = boo.Base.derive({
  name: 'Unknow'

, say:
  function say(thing) {
    return + ': ' + thing }

var Cat = Animal.derive({
  function _withName(name) {
    return this.derive({ name: name }) }

var nyah = Cat.withName('Nyan Cat')
nyah.say('Nyan nyan nyan~')


The easiest way is to grab it from NPM. If you're running in a Browser environment, you can use Browserify:

$ npm install boo

Using with CommonJS

If you're not using NPM, Download the latest release, and require the boo.umd.js file:

var boo = require('boo')

Using with AMD

Download the latest release, and require the boo.umd.js file:

require(['boo'], function(boo) {
  ( ... )

Using without modules

Download the latest release, and load the boo.umd.js file. The properties are exposed in the global boo object:

<script src="/path/to/boo.umd.js"></script>

Compiling from source

If you want to compile this library from the source, you'll need Git, Make, Node.js, and run the following commands:

$ git clone git://
$ cd boo
$ npm install
$ make bundle

This will generate the dist/boo.umd.js file, which you can load in any JavaScript environment.


For Node, just:

$ make test

For the browser:

$ npm install -g brofist-browser
$ make browser-test
# Then point your browsers to the URL on yer console.


There are a few benchmarks you can run:

$ make benchmark


Boo ships with a full narrated reference manual, covering the concepts and designs you need to know to use the library effectively. You can either read it online, or locally — from the file docs/build/html/index.html.

Additionally, you can read the following introduction to Boo:


extend(target, mixins...)

Extends the target with the provided mixins, using a right-most precedence rule.

extend: object, mixin... -> object


Like extend, but pure.

merge: mixin... -> object

derive(proto, mixin...)

Constructs a new object that inherits from proto.

derive: object, mixin... -> object


Instantiates a new object, and initialises it by calling the init method.

make: @object => A... -> this <| object


Like derive, but the prototype is the this object.

derive: @object => mixin... -> this <| object

Getting support

Boo uses the Github tracker for tracking bugs and new features.


Copyright (c) 2011-2014 Quildreen Motta.

Released under the MIT licence.

Something went wrong with that request. Please try again.