evoShop.Item.equals( item )

arguments:

  • item: item to compare with

returns:

  • true if items are the same (has all the same attributes except id)
  • false, otherwise
var shirt = evoShop.add({ name: "Shirt" , price: 4 }),
    mug = evoShop.add({ name: "Mug" , price 2 }),
    shirt2 = evoShop.add({ name: "Shirt" , price: 4 });

shirt.equals( mug ); // false

shirt.equals( shirt2 ); // true