UNPKG

kaffee

Version:

Kaffee is a software project management tool similar to Maven and is written in Coffeescript. Kaffee allows you to compile, test, minify and many other tasks to make building your application simple and fun again.

55 lines (42 loc) 1 kB
/* The {@link Util} class contains serveral utility method that Kaffee uses. @author Fabian M. <mail.fabianm@gmail.com> */ (function() { var Util; Util = (function() { /* Merges two objects into one. @since 0.3.3 @param o Original object. @param a The object to merge it with. @return The result. */ function Util() {} Util.merge = function(o, a) { var key, r, value; r = []; for (key in o) { value = o[key]; r[key] = value; } if (typeof o !== 'object' || typeof a !== 'object') { return r; } for (key in a) { value = a[key]; if (typeof o[key] === 'object') { r[key] = this.merge(o[key], value); } else if (typeof o[key] === 'array') { r[key] = o[key].concat(value); } else { r[key] = value; } } return r; }; return Util; })(); module.exports = Util; }).call(this);