Build distribution

This commit is contained in:
Greg Cobb
2016-07-24 22:38:36 -07:00
parent 0339fc500a
commit 9fedf74f32

View File

@@ -1988,8 +1988,8 @@ getJasmineRequireObj().matchersUtil = function(j$) {
// Objects with different constructors are not equivalent, but `Object`s
// or `Array`s from different frames are.
var aCtor = a.constructor, bCtor = b.constructor;
if (aCtor !== bCtor && !(isFunction(aCtor) && aCtor instanceof aCtor &&
isFunction(bCtor) && bCtor instanceof bCtor)) {
if (aCtor !== bCtor && !(isObjectConstructor(aCtor) &&
isObjectConstructor(bCtor))) {
return false;
}
}
@@ -2041,14 +2041,22 @@ getJasmineRequireObj().matchersUtil = function(j$) {
return extraKeys;
}
}
function has(obj, key) {
return Object.prototype.hasOwnProperty.call(obj, key);
}
function has(obj, key) {
return Object.prototype.hasOwnProperty.call(obj, key);
}
function isFunction(obj) {
return typeof obj === 'function';
}
function isFunction(obj) {
return typeof obj === 'function';
}
function isObjectConstructor(ctor) {
// aCtor instanceof aCtor is true for the Object and Function
// constructors (since a constructor is-a Function and a function is-a
// Object). We don't just compare ctor === Object because the constructor
// might come from a different frame with different globals.
return isFunction(ctor) && ctor instanceof ctor;
}
};