Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return todo.isSaving();
} );
},
updateCompleteTo: function( value ) {
this.forEach( function( todo ) {
todo.complete = value;
todo.save();
} );
}
} );
Todo.algebra = new set.Algebra(
set.props.boolean( "complete" ),
set.props.id( "id" ),
set.props.sort( "sort" )
);
Todo.connection = connectBaseMap( {
url: "/api/todos",
Map: Todo,
List: Todo.List,
name: "todo",
algebra: Todo.algebra
} );
export default Todo;
},
get complete() {
return this.filter( {
complete: true
} );
},
get allComplete() {
return this.length === this.complete.length;
}
} );
Todo.algebra = new set.Algebra(
set.props.boolean( "complete" ),
set.props.id( "id" ),
set.props.sort( "sort" )
);
Todo.connection = connectBaseMap( {
url: "/api/todos",
Map: Todo,
List: Todo.List,
name: "todo",
algebra: Todo.algebra
} );
export default Todo;
todo.complete = value;
todo.save();
} );
},
destroyComplete: function() {
this.complete.forEach( function( todo ) {
todo.destroy();
} );
}
} );
Todo.algebra = new set.Algebra(
set.props.boolean( "complete" ),
set.props.id( "id" ),
set.props.sort( "sort" )
);
Todo.connection = connectBaseMap( {
url: "/api/todos",
Map: Todo,
List: Todo.List,
name: "todo",
algebra: Todo.algebra
} );
export default Todo;