can.Object.subset

  • function
 

Returns true if an Object is a subset of another Object

can.Object.subset(subset, set, compares)

Parameters

  1. subset {Object}

  2. set {Object}

  3. compares {Object}

Returns

{Boolean}

Whether or not subset is a subset of set

Example

can.Object.subset({}, {foo: "bar"} ) //-> true