MCPcopy Index your code
hub / github.com/GoogleTrends/data / extend

Function extend

Pikaday/pikaday.js:138–161  ·  view source on GitHub ↗
(to, from, overwrite)

Source from the content-addressed store, hash-verified

136 },
137
138 extend = function(to, from, overwrite)
139 {
140 var prop, hasProp;
141 for (prop in from) {
142 hasProp = to[prop] !== undefined;
143 if (hasProp && typeof from[prop] === 'object' && from[prop] !== null && from[prop].nodeName === undefined) {
144 if (isDate(from[prop])) {
145 if (overwrite) {
146 to[prop] = new Date(from[prop].getTime());
147 }
148 }
149 else if (isArray(from[prop])) {
150 if (overwrite) {
151 to[prop] = from[prop].slice(0);
152 }
153 } else {
154 to[prop] = extend({}, from[prop], overwrite);
155 }
156 } else if (overwrite || !hasProp) {
157 to[prop] = from[prop];
158 }
159 }
160 return to;
161 },
162
163 adjustCalendar = function(calendar) {
164 if (calendar.month < 0) {

Callers 2

fireEventFunction · 0.85
pikaday.jsFile · 0.85

Calls 2

isDateFunction · 0.85
isArrayFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…