Core

Bootstrap’s core is the continuation of the work on a small JavaScript inheritance library that was published by Jürg Lehni a while ago on Helma.org. This work was inspired by Dean Edward’s Base Class for JavaScript Inheritance, Hannes Wallnoefer’s experiments for Helma and Ben Newman’s implementation for Prototype.
Here an overview of the core’s methods and the conventions of how to use them:

inject and extend

Here an overview of the core’s methods and the conventions of how to use them: Here an overview of the core’s methods and the conventions of how to use them: The core’s two main functions are Function#inject and Function#extend. They are both added to Function so that every prototype inherits them automatically. In JavaScript, prototypes are represented by their constructor functions, which all are instances of Function.

Function#inject injects all properties from the passed object into the prototype.

Function#extend creates a new prototype and constructor function that inherits from the one #extend is called on, and injects all properties from the passed object into this new prototype.

The base for all newly created prototypes in Bootstrap is Base.

MyClass = Base.extend(
    test: function() {
    }
});