can
Version:
MIT-licensed, client-side, JavaScript framework that makes building rich web applications easy.
31 lines (30 loc) • 1.01 kB
JavaScript
/*!
* CanJS - 2.3.34
* http://canjs.com/
* Copyright (c) 2018 Bitovi
* Mon, 30 Apr 2018 20:56:51 GMT
* Licensed MIT
*/
/*can@2.3.34#util/object/isplain/isplain*/
define(['can/util/can'], function (can) {
var core_hasOwn = Object.prototype.hasOwnProperty, isWindow = function (obj) {
return obj !== null && obj == obj.window;
}, isPlainObject = function (obj) {
if (!obj || typeof obj !== 'object' || obj.nodeType || isWindow(obj)) {
return false;
}
try {
if (obj.constructor && !core_hasOwn.call(obj, 'constructor') && !core_hasOwn.call(obj.constructor.prototype, 'isPrototypeOf')) {
return false;
}
} catch (e) {
return false;
}
var key;
for (key in obj) {
}
return key === undefined || core_hasOwn.call(obj, key);
};
can.isPlainObject = isPlainObject;
return can;
});