serialize
Returns the a serialized version of this list.
list.serialize()
Goes through each item in the list and gets its serialized value and returns them in a plain Array.
Each items serialized value is the result of calling canReflect.serialize() on the item.
import {DefineList} from "can";
const list = new DefineList(["first", {foo: "bar"}]);
const serializedList = list.serialize();
console.log(serializedList); //-> ["first", {foo: "bar"}]
Returns
{Array}
:
An array with each item's serialized value.