UNPKG

can

Version:

MIT-licensed, client-side, JavaScript framework that makes building rich web applications easy.

18 lines (14 loc) 405 B
import { ObservableArray, type } from "//unpkg.com/can@6/core.mjs"; import Todo from "./todo.mjs"; class TodoList extends ObservableArray { // Specify the behavior of items in the TodoList static items = Todo; static props = { // Create a computed `complete` property get complete() { // Filter all complete todos return this.filter({ complete: true }); } }; } export default TodoList;