• Stars
    star
    1,910
  • Rank 23,113 (Top 0.5 %)
  • Language
    JavaScript
  • License
    Other
  • Created about 12 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Build CRUD apps in fewer lines of code.

SauceLabs Test Status

Join our Slack Join our Discourse npm version Build Status Greenkeeper badge

CanJS is a collection of client-side JavaScript architectural libraries.

Web Components

CanJS’s StacheElement allows you to create Web Components with observable properties and live-bound templates.

class Counter extends StacheElement {
	static view = `
		Count: <span>{{ this.count }}</span>
		<button on:click="this.increment()">+1</button>
	`;

	static props = {
		count: 0
	};

	increment() {
		this.count++;
	}
}
customElements.define("my-counter", Counter);

Model layer

Components shouldn’t be concerned with how data is fetched, updated, or cached.

CanJS provides the right abstractions for your model code to be cleanly separated from your UI code. Learn more…

Promises in templates

CanJS’s stache templating language can directly read the state and values from Promises.

No need to write any extra code to determine whether a Promise is pending, resolved, or rejected. Learn more…

{{# if(this.promise.isPending) }}
  Loading…
{{/ if }}
{{# if(this.promise.isRejected) }}
  Error: {{ this.promise.reason }}
{{/ if }}
{{# if(this.promise.isResolved) }}
  Result: {{ this.promise.value }}
{{/ if }}

Real-time list updating

After data is created, updated, or destroyed, CanJS automatically updates your lists for you.

Filtering and sorting are preserved, so you don’t have to manually update your lists or fetch the same data again. Learn more…

Getting Started

Ready to get started? See the Setting Up CanJS, API Docs and Guides pages.

Support / Contributing

Before you make an issue, please read our Contributing guide.

You can find the core team on Slack.

Release History

See Releases.

License

MIT License.

More Repositories

1

can-zone

A context for tracking asynchronous activity in JavaScript applications.
JavaScript
91
star
2

can-ndjson-stream

Converts a ReadableStream of raw ndjson data to a ReadableStream of JSON objects
JavaScript
43
star
3

can-compile

Compile CanJS Mustache and EJS views for lightning fast production apps
JavaScript
35
star
4

can-connect

Model layer utilities for every JavaScript framework! Assemble real-time, high performance, restful data connections.
JavaScript
29
star
5

can-fixture

Intercept and simulate AJAX requests. Works without CanJS.
JavaScript
22
star
6

canjs-feathers

CanJS model bindings for real-time updates from Feathers
JavaScript
21
star
7

can-observe

Observable objects
JavaScript
20
star
8

can-derive

Derive live can.List and can.Maps from source lists.
JavaScript
17
star
9

can-bacon

Bacon.js integration for CanJS (and vice-versa)
JavaScript
17
star
10

can-define

Observable properties
JavaScript
15
star
11

worker-render

Run your single-page application in a web worker
JavaScript
14
star
12

can-meetup

CanJS meetup material
JavaScript
12
star
13

can-upgrade

Scripts to help you upgrade to new versions of CanJS
JavaScript
11
star
14

can-set

Utilities for comparing sets
JavaScript
11
star
15

can-route

Observable front-end application routing for CanJS.
JavaScript
10
star
16

can-util

Essential utilities used by lots of CanJS's projects.
JavaScript
10
star
17

can-connect-feathers

The FeathersJS client library for DoneJS and can-connect
JavaScript
10
star
18

can-stache

Live binding handlebars templates
JavaScript
10
star
19

can-compute

Create derived observable values.
JavaScript
9
star
20

can-component

Custom elements and widgets
JavaScript
8
star
21

can-stache-bindings

Binding helpers for CanJS template engines
JavaScript
8
star
22

dom-patch

dom-patch
JavaScript
8
star
23

can-route-pushstate

Pushstate for can-route
JavaScript
8
star
24

can-control

Declarative event bindings
JavaScript
7
star
25

can-migrate

CLI & codemod scripts for upgrading to CanJS 3, 4 and 5
JavaScript
7
star
26

can-define-lazy-value

Define properties with lazy values using Object.defineProperty
JavaScript
7
star
27

can-fixture-socket

Simulate socket.io services.
JavaScript
7
star
28

bit-docs-html-canjs

The plugins to produce CanJS.com
JavaScript
7
star
29

can-construct

Inheritable constructor functions
JavaScript
7
star
30

can-view-callbacks

Register callbacks for CanJS view engines
JavaScript
6
star
31

can-ajax

jQuery-inspired AJAX request library.
JavaScript
6
star
32

dom-diff

Diffing for a DOM-like DOM.
JavaScript
6
star
33

steal-can-example

An example of progressive loading using steal and canjs.
JavaScript
6
star
34

can-query-logic

Perform data queries and compare queries against each other. Provides logic useful for data caching and real-time behavior.
JavaScript
6
star
35

can-react

A compatibility layer required to enable donejs-react.
JavaScript
6
star
36

can-observation

Computed values
JavaScript
6
star
37

can-symbol

Well known symbols used to detail behaviors of different object
JavaScript
6
star
38

can-observable-object

Defined object classes that are observable
JavaScript
6
star
39

can-deparam

Deserialize a query string into an array or object.
JavaScript
6
star
40

can-vdom

Virtual DOM for use with CanJS projects
JavaScript
5
star
41

can-event

Event handling utilities
JavaScript
5
star
42

can-stache-converters

Stache converters for commonly needed tasks.
JavaScript
5
star
43

can-interrupt

Pause or cancel changes on a map and route
JavaScript
5
star
44

can-view-autorender

Automatically render templates found in the document
JavaScript
5
star
45

can-value

Observable values from other CanJS observables.
JavaScript
5
star
46

devtools

Chrome DevTools for CanJS.
JavaScript
5
star
47

can-view-parser

HTML parser for CanJS view engines
JavaScript
4
star
48

can-map

Observable key-value bindings
JavaScript
4
star
49

can-devtools

Browser inspectors for CanJS applications
JavaScript
4
star
50

can-view-target

View target hydration
JavaScript
4
star
51

can-param

Serialize an array or object into a query string. Like $.param.
JavaScript
4
star
52

can-view-scope

Scope management for view engines
JavaScript
4
star
53

can-jquery

CanJS integrations for jQuery
JavaScript
4
star
54

can-model

The old can.Model code
JavaScript
4
star
55

can-construct-super

Call base functions when extending can-constructs
JavaScript
4
star
56

can-reflect

Operate on unknown data types
JavaScript
4
star
57

can-define-stream

Add useful stream conversion methods to a supplied can-define/map/map or can-define/list/list constructor using a stream interface such as can-stream-kefir.
JavaScript
4
star
58

can-animate

animation view helpers
JavaScript
4
star
59

steal-stache

A plugin that allows you to import stache templates with stealjs.
JavaScript
4
star
60

can-type

Create TypeObjects for use in defining ViewModels and Models.
JavaScript
4
star
61

can-react-component

Create a React component out of a can-component
JavaScript
4
star
62

can-bind

Updates one observable value with the value of another observable.
JavaScript
4
star
63

can-ejs

The EJS templates on their own
JavaScript
4
star
64

can-observable-array

A defined array
JavaScript
4
star
65

can-stache-loader

CanJS Stache loader for webpack
JavaScript
4
star
66

can-view-live

View live binding utilities
JavaScript
4
star
67

can-devtools-components

Components for CanJS Devtools
JavaScript
3
star
68

can-single-reference

Assign a value to a function that can be collected later.
JavaScript
3
star
69

can-cid

Utility for getting a unique identifier for an object.
JavaScript
3
star
70

can-list

Observables lists
JavaScript
3
star
71

can-reflect-promise

Set up Promise types to work as Map-likes with can-reflect
JavaScript
3
star
72

can-view-import

Import dependencies in CanJS views
JavaScript
3
star
73

can-define-backup

Backup and restore a DefineMap state
JavaScript
3
star
74

can-globals

A place for dependency injected values and probably feature detection
JavaScript
3
star
75

can-dom-mutate

Dispatch and listen for DOM mutations
JavaScript
3
star
76

can-data-types

Useful data types
JavaScript
3
star
77

can-view-nodelist

Node list helpers
JavaScript
3
star
78

can-view-href

Make flexible route links
JavaScript
3
star
79

can-simple-observable

Create an observable value.
JavaScript
3
star
80

can-validate-legacy

Legacy 2.3 can-validate that works in 3.0
JavaScript
3
star
81

can-map-define

Define rich attribute behavior
JavaScript
3
star
82

can-dom-events

Listen to native and custom DOM events
JavaScript
3
star
83

can-validate-interface

Utility to validate property existence. Test for missing properties before they cause errors later.
JavaScript
3
star
84

can-simple-map

A performant live-bound map
JavaScript
3
star
85

can-control-modifier

Control action modifiers
JavaScript
3
star
86

can-log

Utilities for logging to the console.
JavaScript
3
star
87

can-stache-element

Create custom elements with can-stache and can-define-class
JavaScript
3
star
88

can-stream-kefir

Stream values into and out of computes
JavaScript
3
star
89

can-types

A stateful container for CanJS type information.
JavaScript
3
star
90

can-event-dom-radiochange

The custom "radiochange" event
JavaScript
3
star
91

can-element

Make custom elements with CanJS
JavaScript
3
star
92

can-define-stream-kefir

A mixin that allows properties to be defined as streams on can-define types.
JavaScript
3
star
93

can-kefir

Reflects kefir streams so they can be used many places within CanJS.
JavaScript
3
star
94

can-attribute-observable

Create observables from HTML attributes.
JavaScript
2
star
95

can-string

String utility methods
JavaScript
2
star
96

can-rx

RxJS integration for CanJS
JavaScript
2
star
97

can-legacy-view-helpers

Legacy view helpers used by can-ejs and can-mustache.
JavaScript
2
star
98

can-observable-mixin

Define properties on JavaScript classes
JavaScript
2
star
99

can-key-tree

A tree type useful for adding removing values.
JavaScript
2
star
100

can-validate-validatejs

Create validator functions using validate.js.
JavaScript
2
star