It's key to note that Ender users have the optional ability to call noConflict() on Ender in case the top-level $ symbol is already taken. With that in mind, Developers should always wrap their Ender extensions as such:

Another common case for Plugin developers is to be able hook into the internal collection chain. To do this, simply call the same ender method but pass true as the second argument:

!function ($) {
$.ender(myExtensions, true);
}(ender);

Within this scope the internal prototype is exposed to the developer with an existing elements instance property representing the node collection. Have a look at how the Bonzo DOM utility does this. Also note that the internal chain can be augmented at any time (outside of this build) during your application. For example:

Ender exposes a module API which is based on CommonJS Modules spec v1.1.1. There are two methods it exposes to do this.

The first method is require. Require takes a string which corresponds to a package name and returns a package object. For example:

var _ = require('underscore') //return the underscore object

To register a package use the provide method. The provide method looks like this:

provide("myPackage", myPackageObj)

These methods are particularly useful when working with microlibs which are already CommonJS compliant (like underscore, backbone, etc.). It is also great when you run into libs who are competing for the same namespace. So for example, if microlib "foo" and microlib "bar" both expose a method baz -- you could use require to gain access to the method being overridden -- as well as set which method you would prefer to be on ender's internal chain... for example: