This app provides monitoring and information features for the common freifunk user and the technical stuff of a freifunk community.
Code base is taken from a TUM Practical Course project and added here to see if Freifunk Altdorf can use it.
https://www.freifunk-altdorf.de
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
683 B
36 lines
683 B
'use strict'; |
|
|
|
var typeOf = require('kind-of'); |
|
|
|
/** |
|
* Expose `extend` |
|
*/ |
|
|
|
module.exports = extend; |
|
|
|
/** |
|
* Extend `o` with properties of other `objects`. |
|
* |
|
* @param {Object} `o` The target object. Pass an empty object to shallow clone. |
|
* @param {Object} `objects` |
|
* @return {Object} |
|
*/ |
|
|
|
function extend(o) { |
|
if (typeOf(o) !== 'object') { return {}; } |
|
var args = arguments; |
|
var len = args.length - 1; |
|
|
|
for (var i = 0; i < len; i++) { |
|
var obj = args[i + 1]; |
|
|
|
if (typeOf(obj) === 'object' && typeOf(obj) !== 'regexp') { |
|
for (var key in obj) { |
|
if (obj.hasOwnProperty(key)) { |
|
o[key] = obj[key]; |
|
} |
|
} |
|
} |
|
} |
|
return o; |
|
};
|
|
|