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
    • can-define/map/map
      • events
        • __keys
        • propertyName
      • static
        • extend
        • seal
      • prototype
        • forEach
        • get
        • on
        • serialize
        • set
        • *
    • 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/map/map
  • /
  • *
  • / On this page
    • *

      property

      Define default behavior for a Map instance.

      • source

      PropDefinition

      By defining a wildcard property like "*" on the prototype, this will supply a default behavior for every property. The default wildcard "*" definition makes every property run through the "observable" types converter. It looks like:

      "*": {
        type: "observable"
      }
      

      Setting the wildcard is useful when every property on a map instance should behave in a particular way. For example, for map types used with can-route:

      var MyMap = DefineMap.extend({
        "*": {
          type: "stringOrObservable"
        }
      })
      

      Or if you want to turn off implicit conversion of Objects and Arrays to DefineMap and DefineLists:

      var MyMap = DefineMap.extend({
        "*": {
          type: "*"
        }
      })
      

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