Пример #1
0
 forEach: function (obj, f, context) {
     for (var prop in obj) {
         if (hasOwnProperty(obj, prop) && propertyIsEnumerable(obj, prop)) {
             if (f.call(context, obj[prop], prop, obj) === false) {
                 return;
             }
         }
     }
 },
Пример #2
0
  Assertion.add('ownProperty', function(name, description) {
    name = convertPropertyName(name);
    this.params = {
      actual: this.obj,
      operator: 'to have own property ' + formatProp(name),
      message: description
    };

    this.assert(hasOwnProperty(this.obj, name));

    this.obj = this.obj[name];
  });
Пример #3
0
 has: function (obj, prop) {
     return hasOwnProperty(obj, prop);
 },
 has: function(obj, prop) {
   return shouldUtil.hasOwnProperty(obj, prop);
 },