serialize()
Description
Serializes data of To Do List into a JSON object
Usage
serialize(): object;
Returns
The method returns serialized data of the To Do List
{
tasks: [],
users: [],
projects: [],
tags: [],
activeProject: string,
}
Example
const { ToDo, Toolbar } = todo;
const { tasks, users, projects, tags } = getData();
const list = new ToDo("#root", {
tasks,
users,
projects,
tags,
});
// get an object with data of To Do List
list.serialize();
Related article: Loading and storing data