MCPcopy Create free account
hub / github.com/unconed/TermKit / merge

Function merge

HTML/external/syntaxhighlighter_3.0.83/src/shCore.js:558–569  ·  view source on GitHub ↗

* Merges two objects. Values from obj2 override values in obj1. * Function is NOT recursive and works only for one dimensional objects. * @param {Object} obj1 First object. * @param {Object} obj2 Second object. * @return {Object} Returns combination of both objects.

(obj1, obj2)

Source from the content-addressed store, hash-verified

556 * @return {Object} Returns combination of both objects.
557 */
558function merge(obj1, obj2)
559{
560 var result = {}, name;
561
562 for (name in obj1)
563 result[name] = obj1[name];
564
565 for (name in obj2)
566 result[name] = obj2[name];
567
568 return result;
569};
570
571/**
572 * Attempts to convert string to boolean.

Callers 1

shCore.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected