MCPcopy
hub / github.com/canjs/canjs

github.com/canjs/canjs @v6.6.2 sqlite

repository ↗ · DeepWiki ↗ · release v6.6.2 ↗
1,253 symbols 1,794 edges 284 files 12 documented · 1%
README

CanJS

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.

Core symbols most depended-on inside this repo

jQuery
called by 44
test/builders/browserify/compiled-out.js
resolve
called by 32
test/builders/browserify/compiled-out.js
exec
called by 18
docs/can-guides/commitment/recipes/text-editor/2-bold.js
save
called by 17
docs/can-guides/experiment/crud-beginner/8.js
getAll
called by 14
test/builders/browserify/compiled-out.js
value
called by 14
docs/can-guides/commitment/recipes/canvas-clock/3-circle.js
compute
called by 12
test/builders/browserify/compiled-out.js
markFunction
called by 10
test/builders/browserify/compiled-out.js

Shape

Method 520
Class 410
Function 323

Languages

TypeScript100%

Modules by API surface

test/builders/browserify/compiled-out.js229 symbols
docs/can-guides/experiment/todomvc/9-toggle/js.js26 symbols
docs/can-guides/commitment/recipes/credit-card-advanced/9-disable-payments.js23 symbols
docs/can-guides/commitment/recipes/credit-card-advanced/8-pay-button.js22 symbols
docs/can-guides/experiment/todomvc/8-routing/js.js20 symbols
docs/can-guides/experiment/todomvc/7-edit/js.js19 symbols
docs/can-guides/commitment/recipes/modals/4-next.js17 symbols
docs/can-guides/commitment/recipes/credit-card-advanced/7-disable-pay.js17 symbols
docs/can-guides/commitment/recipes/modals/3-multiple-modals.js16 symbols
docs/can-guides/commitment/recipes/credit-card-advanced/6-cvc.js16 symbols
docs/can-guides/experiment/todomvc/6-list/js.js15 symbols
docs/can-guides/commitment/recipes/playlist-editor/8-create-playlist.js15 symbols

Dependencies from manifests, versioned

@feathersjs/socketio-client1.2.1 · 1×
@octokit/rest16.27.3 · 1×
@webcomponents/custom-elements1.2.4 · 1×
bit-docs0.2.0 · 1×
bundlesize0.18.0 · 1×
can6.0.0 · 1×
can-ajax2.4.6 · 1×
can-assign1.3.3 · 1×
can-attribute-encoder1.1.4 · 1×
can-attribute-observable2.0.2 · 1×
can-bind1.5.1 · 1×

For agents

$ claude mcp add canjs \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact