UNPKG

e-lado

Version:

[![CircleCI](https://circleci.com/gh/sharetribe/sharetribe/tree/master.svg?style=svg)](https://circleci.com/gh/sharetribe/sharetribe/tree/master) [![Dependency Status](https://gemnasium.com/sharetribe/sharetribe.png)](https://gemnasium.com/sharetribe/shar

25 lines (22 loc) 532 B
'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; } };