This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/sockjs-client/lib/utils/object.js
2019-08-11 20:48:02 +02:00

24 lines
532 B
JavaScript

'use strict';
module.exports = {
isObject: function(obj) {
var type = typeof obj;
return type === 'function' || type === 'object' && !!obj;
}
, extend: function(obj) {
if (!this.isObject(obj)) {
return obj;
}
var source, prop;
for (var i = 1, length = arguments.length; i < length; i++) {
source = arguments[i];
for (prop in source) {
if (Object.prototype.hasOwnProperty.call(source, prop)) {
obj[prop] = source[prop];
}
}
}
return obj;
}
};