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
    • can-route
    • can-route-pushstate
    • can-set
      • types
        • Set
        • Compares
        • Prop
      • properties
        • Algebra
          • prototype
            • difference
            • equal
            • getSubset
            • getUnion
            • has
            • index
            • intersection
            • properSubset
            • subset
            • union
        • Translate
        • props
    • 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-set
  • /
  • Algebra
  • /
  • has
  • / On this page
    • has

      function
      • source

      algebra.has(set, props)

      Used to tell if the set contains the instance object props.

      var algebra = new set.Algebra(
        new set.Translate("where","$where")
      );
      algebra.has(
        {"$where": {playerId: 5}},
        {id: 5, type: "3pt", playerId: 5, gameId: 7}
      ) //-> true
      

      Parameters

      1. set {Set}:

        A set.

      2. props {Object}:

        An instance's raw data.

      Returns

      {Boolean}:

      Returns true if props belongs in set and false it not.

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