Library Collection pages

Each collection page acts as an overview and cheat sheet for the modules and functionality
contained within the collection.

The Core collection contains the documentation for the libraries that
are use most commonly and directly within a CanJS application. This is where the Model-View-ViewModel
libraries of CanJS are documented.

The Infrastructure collection contains the utility libraries that power the core and ecosystem
collection. Often, this functionality is used indirectly. For example, the can-event mixin
is used to add on, off, and dispatch methods to can-define and can-compute. And, can-util contains a wide variety of low-level DOM and JavaScript utilities.

Sometimes Infrastructure is used directly. The most important examples are:

Finally, the Legacy collection. This is for libraries that are no longer under active
development. Hopefully, you aren’t there very often.

Look to library collection pages for a high level cheat and explanation of every module within
the collection.

Package and Module Pages

A package or module documents the "direct" functionality of the export and provides an overview of
all functionality contained within the module or package.

For example, can-define/list/list documents the "direct" functionality of the export, namely
the DefineList function that is exported. While DefineList.extend is the most common starting place when using DefineList, the DefineList export method can only be used like new DefineList() directly. This is why new DefineList() is documented
on can-define/list/list.

However, after the new DefineList() signature is detailed, can-define/list/list has a #Use
section that provides an overview of all functionality contained within the can-define/list/list
module.

Look to Package and module pages for details of what is specifically exported and an overview
of what the module does, why it’s useful, and how to use it.

Functions, Properties, and Typedef pages

Within a module, there might be a variety of functions, properties and types a
module might provide.

These values are generally organized by groupings. The most common groupings are:

prototype - A property or function is on the prototype of a parent function.

static - A property or method is a direct value on the parent function or object.

events - Events dispatched on the parent object or instances of the parent function.

types - Type definitions.

Let’s see a few examples and then give an overview of how their content is structured.

As you can see above, a Store can have lots of methods
itself: createData, destroyData, etc. So this type that isn’t directly
accessible is documented under can-fixture’s types. It’s also
specified as the return value of can-fixture.store.

Functions, Properties, and Typedef content

Each function, property, and typedef page will have one or more signature’s describing
what is being documented.

Signatures are the what and the how. They should be precise on the
behavior of what is being documented.

Some function, property, and typedef pages have #Use sections that give
more information and examples on what is being documented.

Look to Functions, Properties, and Typedef pages to provide low-level details on
a specific piece of CanJS’s API.

How to find what you’re looking for ...

Get a good understand of the purpose behind each module.

Start with core modules.

Then checkout infrastructure modules.

If you don’t find what you want on the lowest level, walk up to the parent module, it
might be in its #Use section.