DoneJS StealJS jQuery ++ FuncUnit DocumentJS
3.0.0
2.3.27

 

  • Github
  • Twitter
  • Chat
  • Forum
  • Guides
  • Core
    • can-component
    • can-compute
    • can-connect
    • can-define
    • can-define/list/list
      • events
        • add
        • length
        • propertyName
        • remove
      • prototype
        • concat
        • filter
        • forEach
        • get
        • indexOf
        • join
        • map
        • on
        • pop
        • push
        • replace
        • reverse
        • serialize
        • set
        • shift
        • slice
        • sort
        • splice
        • unshift
        • *
        • #
      • static
        • extend
    • can-define/map/map
    • can-route
    • can-route-pushstate
    • can-set
    • can-stache
    • can-stache/helpers/route
    • can-stache-bindings
  • Ecosystem
  • Infrastructure
  • Legacy
  • Bitovi
    • Bitovi.com
    • Blog
    • Consulting
    • Training
    • Open Source
  • Chat
  • Forum
  • Star
  • Follow @canjs
  • CanJS
  • /
  • Core
  • /
  • can-define/list/list
  • /
  • serialize
  • / On this page
    • serialize

      function

      Returns the a serialized version of this list.

      • source

      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 .serialize() on the item or if the item doesn't have a serialize method, the item itself.

      var list = new DefineList(["first", {foo: "bar"}]);
      var serializedList = list.serialize();
      
      serializedList //-> ["first", {foo: "bar"}]
      

      Returns

      {Array}:

      An array with each item's serialied value.

      CanJS is part of DoneJS. Created and maintained by the core DoneJS team and Bitovi. Currently 3.0.0.