DoneJS StealJS jQuery++ FuncUnit DocumentJS
4.3.0
5.0.0 3.13.1 2.3.35
  • About
  • Guides
  • API Docs
  • Community
  • Contributing
  • Bitovi
    • Bitovi.com
    • Blog
    • Design
    • Development
    • Training
    • Open Source
    • About
    • Contact Us
  • About
  • Guides
  • API Docs
    • Observables
      • can-bind
      • can-compute
      • can-debug
      • can-define
      • can-define/list/list
      • can-define/map/map
      • can-define-backup
      • can-define-stream
      • can-define-stream-kefir
      • can-event-queue
      • can-kefir
      • can-list
      • can-map
      • can-map-define
      • can-observation
      • can-observation-recorder
      • can-observe
      • can-simple-map
      • can-simple-observable
      • can-stream
      • can-stream-kefir
      • can-value
    • Data Modeling
      • can-connect
      • can-connect-feathers
      • can-fixture
      • can-fixture-socket
      • can-ndjson-stream
      • can-set
    • Views
      • can-component
      • can-stache
      • can-stache-bindings
      • can-stache-converters
      • can-stache-route-helpers
      • can-view-autorender
      • can-view-callbacks
      • can-view-import
      • can-view-live
      • can-view-model
      • can-view-nodelist
      • can-view-parser
      • can-view-scope
      • can-view-target
      • react-view-model
      • react-view-model/component
      • steal-stache
    • Routing
      • can-deparam
      • can-param
      • can-route
      • can-route-hash
      • can-route-mock
      • can-route-pushstate
    • JS Utilities
      • can-assign
      • can-define-lazy-value
      • can-diff
      • can-globals
      • can-join-uris
      • can-key
      • can-key-tree
      • can-make-map
      • can-parse-uri
      • can-queues
      • can-string
      • can-string-to-any
      • can-util
      • can-zone
      • can-zone-storage
    • DOM Utilities
      • can-ajax
      • can-attribute-encoder
      • can-child-nodes
      • can-control
      • can-dom-data
      • can-dom-events
      • can-dom-mutate
      • can-event-dom-enter
      • can-event-dom-radiochange
      • can-fragment
    • Data Validation
      • can-define-validate-validatejs
      • can-validate
      • can-validate-interface
      • can-validate-legacy
      • can-validate-validatejs
    • Typed Data
      • can-cid
      • can-construct
      • can-construct-super
      • can-data-types
      • can-namespace
      • can-reflect
      • can-reflect-dependencies
      • can-reflect-promise
      • can-types
    • Polyfills
      • can-symbol
      • can-vdom
    • Core
    • Infrastructure
      • can-global
      • can-test-helpers
    • Ecosystem
    • Legacy
  • Community
  • Contributing
  • GitHub
  • Twitter
  • Chat
  • Forum
  • News
Bitovi

API Docs

  • npm package badge
  • Star
  • Edit on GitHub

Welcome to the CanJS API documentation! Learn about all the packages that make-up CanJS and how they work together to help you build amazing applications.

Overview

CanJS is made of many independent packages and modules. Those packages and modules are organized within the following collections:

  • core - The best, most hardened and generally useful libraries in CanJS. These are the APIs a CanJS developer uses the vast majority of the time and are the libraries you should learn first.
  • infrastructure - Utility libraries that power the core collection. These are lower-level utilities that are often used indirectly by the core libraries. These are good to know if you want to create special behaviors.
  • ecosystem - Useful libraries that add important features or extend the core collection. Checkout these libraries when you want pre-made extensions to CanJS. These libraries can be less stable and more experimental than the core and infrastructure packages.
  • legacy - Former libraries that are not under active development, but we still accept patches. It's best to avoid these libraries as they have been replaced by better solutions in other collections.

CanJS also has a can package that can be used to load the core modules as a shorthand:

import can from "can";
can.DefineMap
can.DefineList
can.stache
can.Component
can.route
can.connect
can.set

The can package also serves as a integration test of all of CanJS's other packages. Read on for more information on these packages.

The can Package

While CanJS is designed to be used and should be used as independent packages, we still publish a can package with a version number, currently 4.3.0. We do this so there is a specified version of all of the sub-project packages that are integration tested to work together.

The can package uses semantic versioning with respect to the Core and Infrastructure collections only. Read the Release Guide for more information on CanJS’s release process.

The sub-project package versions for can 4.3.0 are listed below. Copy the ones you use into your package.json if you want to use the same packages that were tested as part of CanJS 4.3.0’s release.

Core Collection

  "can-component": "4.2.2",
  "can-compute": "4.1.0",
  "can-connect": "2.1.0",
  "can-define": "2.4.0",
  "can-route": "4.3.0",
  "can-route-pushstate": "4.1.0",
  "can-set": "1.6.0",
  "can-stache": "4.9.0",
  "can-stache-bindings": "4.3.0",
  "can-stache-route-helpers": "1.1.0",

Infrastructure Collection

  "can-construct": "4.3.0",
  "can-control": "4.2.0",
  "can-observation": "4.1.0",
  "can-simple-map": "4.2.0",
  "can-simple-observable": "2.2.0",
  "can-util": "3.12.0",
  "can-view-callbacks": "4.3.0",
  "can-view-live": "4.2.0",
  "can-view-model": "4.0.1",
  "can-view-nodelist": "4.3.0",
  "can-view-parser": "4.1.0",
  "can-view-scope": "4.5.0",
  "can-view-target": "4.1.0",

Ecosystem collection

  "can-construct-super": "3.2.0",
  "can-define-stream": "1.1.0",
  "can-fixture": "2.1.0",
  "can-fixture-socket": "1.1.0",
  "can-stache-converters": "4.2.0",
  "can-stream-kefir": "1.2.0",
  "can-vdom": "4.2.0",
  "can-view-autorender": "4.2.0",
  "can-view-import": "4.1.0",
  "can-zone": "0.6.22",
  "steal-stache": "4.1.5",

Legacy Collection

  "can-compute": "4.1.0",
  "can-list": "4.1.0",
  "can-map": "4.1.1",
  "can-map-define": "4.2.0",
  "can-validate-legacy": "1.4.0",

Core Collection

The best, most hardened and generally useful libraries in CanJS.

  • can-define 2.4.0 Observable objects
    • npm install can-define --save
    • Star
  • can-set 1.6.0 Service modeling
    • npm install can-set --save
    • Star
  • can-connect 2.1.0 Data connection
    • npm install can-connect --save
    • Star
  • can-stache 4.9.0 Live binding templates
    • npm install can-stache --save
    • Star
  • can-component 4.2.2 Custom elements
    • npm install can-component --save
    • Star
  • can-stache-bindings 4.3.0 View bindings
    • npm install can-stache-bindings --save
    • Star
  • can-route 4.3.0 Routing
    • npm install can-route --save
    • Star
  • can-route-pushstate 4.1.0 Pushstate routing
    • npm install can-route-pushstate --save
    • Star

Infrastructure Collection

Utility libraries that power the core collection.

  • can-control 4.2.0 DOM widget constructor
    • npm install can-control --save
    • Star
  • can-util 3.12.0 Low-level JS and DOM utilities
    • npm install can-util --save
    • Star
  • can-construct 3.5.0 Extensible constructors
    • npm install can-construct --save
    • Star
  • can-observation 4.1.0 Observation notification
    • npm install can-observation --save
    • Star
  • can-simple-map 4.2.0 Simple observable object
    • npm install can-simple-map --save
    • Star
  • can-simple-observable 2.2.0 Create an observable value
    • npm install can-simple-observable --save
    • Star
  • can-view-callbacks 4.3.0 Register custom elements or attributes in can-stache
    • npm install can-view-callbacks --save
    • Star
  • can-view-model 4.0.1 Read a view-model from a custom element
    • npm install can-view-model --save
    • Star
  • can-view-scope 4.5.0 Scope lookup
    • npm install can-view-scope --save
    • Star
  • can-view-parser 4.1.0 Parses HTML and magic tags
    • npm install can-view-parser --save
    • Star
  • can-view-target 4.1.0 A fast-path DOM fragment compile target
    • npm install can-view-target --save
    • Star
  • can-view-live 4.2.0 Update the DOM with a compute
    • npm install can-view-live --save
    • Star
  • can-view-nodelist 4.3.0 Maintains live-binding relationships
    • npm install can-view-nodelist --save
    • Star
  • can-cid 1.3.1 Get a unique identifier for objects
    • npm install can-cid --save
    • Star
  • can-deparam 1.2.0 Deserialize a query string into an array or object
    • npm install can-deparam --save
    • Star
  • can-param 1.1.0 Serialize an array or object into a query string
    • npm install can-param --save
    • Star
  • can-types 1.2.0 A stateful container for CanJS type information
    • npm install can-types --save
    • Star
  • can-namespace 1.0.0 Namespace where can-* packages are registered
    • npm install can-namespace --save
    • Star
  • can-symbol 1.6.1 Symbols used to detail how CanJS may operate on different objects
    • npm install can-symbol --save
    • Star
  • can-reflect 1.17.0 Perform reflection on unknown data types
    • npm install can-reflect --save
    • Star
  • react-view-model 1.0.1 Create an auto-rendering container component with an observable view-model.
    • npm install react-view-model --save
    • Star
  • can-ajax jQuery-inspired AJAX request library.
    • npm install can-ajax --save
    • Star
  • can-globals 1.2.0 An environment agnostic container for global variables.
    • npm install can-globals --save
    • Star
  • can-define-lazy-value 1.1.0 An environment agnostic container for global variables.
    • npm install can-define-lazy-value --save
    • Star
  • can-assign A simplified version of Object.assign.
    • npm install can-assign --save
    • Star
  • can-dom-events 1.3.0 Listen for native and custom DOM events.
    • npm install can-dom-events --save
    • Star
  • can-event-dom-enter 2.2.0 Watch for enter keys presses on a DomEventTarget.
    • npm install can-event-dom-enter --save
    • Star
  • can-event-dom-radiochange 2.2.0 A custom event for listening to changes of inputs with type "radio".
    • npm install can-event-dom-radiochange --save
    • Star
  • can-parse-uri Parse a URI into its components.
    • npm install can-parse-uri --save
    • Star
  • can-validate-interface 1.0.2 Utility to validate property existence.
    • npm install can-validate-interface --save
    • Star
  • can-zone-storage 1.0.1 Implement a Zone-safe memory-based storage solution.
    • npm install can-zone-storage --save
    • Star

Ecosystem Collection

Useful libraries that add important features or extend the core collection.

  • can-fixture 2.1.0 Simulate AJAX requests
    • npm install can-fixture --save
    • Star
  • can-connect-feathers 4.2.0 Create connections to a FeathersJS API server.
    • npm install can-connect-feathers --save
    • Star
  • can-zone 0.6.22 Track asynchronous activity
    • npm install can-zone --save
    • Star
  • can-stache-converters 4.2.0 Form two-way binding helpers
    • npm install can-stache-converters --save
    • Star
  • steal-stache 4.1.5 Import can-stache templates as dependencies with StealJS
    • npm install steal-stache --save
    • Star
  • can-view-import 4.1.0 Import modules within can-stache templates
    • npm install can-view-import --save
    • Star
  • can-view-autorender 4.2.0 Automatically render templates in script tags
    • npm install can-view-autorender --save
    • Star
  • can-construct-super 3.2.0 Call can-construct base methods easily
    • npm install can-construct-super --save
    • Star
  • can-vdom 4.2.0 A virtual DOM that supports can-stache
    • npm install can-vdom --save
    • Star
  • can-kefir 1.1.0 Use streams in can-stache.
    • npm install can-kefir --save
    • Star
  • can-stream-kefir 1.2.0 Convert observable values into streams
    • npm install can-stream-kefir --save
    • Star
  • can-define-stream 1.1.0 Define property values using streams
    • npm install can-define-stream --save
    • Star
  • can-validate 1.2.0 Validation tools and types definitions
    • npm install can-validate --save
    • Star
  • can-validate-validatejs 1.0.0 Create validators with ValidateJS
    • npm install can-validate-validatejs --save
    • Star
  • can-define-validate-validatejs 1.1.0 Validation for DefineMaps using the ValidateJS library
    • npm install can-define-validate-validatejs --save
    • Star
  • can-ndjson-stream 1.0.0 Convert ndjson stream into a ReadableStream of JS objects
    • npm install can-ndjson-stream --save
    • Star
  • can-observe 2.2.0 Create plain observable objects
    • npm install can-observe --save
    • Star

Legacy Collection

Former libraries that are not under active development, but we still accept patches.

  • can-compute 4.1.0 Observable values and observable composite values
    • npm install can-compute --save
    • Star
  • can-map 4.1.1 Observable map
    • npm install can-map --save
    • Star
  • can-list 4.1.0 Observable lists
    • npm install can-list --save
    • Star
  • can-map-define 4.2.0 Define property behavior
    • npm install can-map-define --save
    • Star
  • can-validate-legacy 1.4.0 Validation plugin for can-map's.
    • npm install can-validate-legacy --save
    • Star

CanJS is part of DoneJS. Created and maintained by the core DoneJS team and Bitovi. Currently 4.3.0.

On this page

Get help

  • Chat with us
  • File an issue
  • Ask questions
  • Read latest news