|
116 | 116 | : []; |
117 | 117 | }; |
118 | 118 |
|
| 119 | + var isObject = function (object) { |
| 120 | + return object && object.constructor === Object; |
| 121 | + }; |
| 122 | + |
| 123 | + var assign = function () { |
| 124 | + var to = {}; |
| 125 | + var arg = arguments; |
| 126 | + for (var index = 0; index < arg.length; index++) { |
| 127 | + var nextSource = arg[index]; |
| 128 | + if (isObject(nextSource)) { |
| 129 | + for (var nextKey in nextSource) { |
| 130 | + if (hasProp(nextSource, nextKey)) { |
| 131 | + to[nextKey] = nextSource[nextKey]; |
| 132 | + } |
| 133 | + } |
| 134 | + } |
| 135 | + } |
| 136 | + return to; |
| 137 | + }; |
| 138 | + |
| 139 | + // Merge overwriteOptions with sa_settings |
| 140 | + overwriteOptions = assign(overwriteOptions, window.sa_settings); |
| 141 | + |
119 | 142 | /** if ignoremetrics **/ |
120 | 143 | // Customers can skip data points |
121 | 144 | var ignoreMetrics = convertCommaSeparatedToArray( |
|
164 | 187 | return typeof func == "function"; |
165 | 188 | }; |
166 | 189 |
|
167 | | - var isObject = function (object) { |
168 | | - return object && object.constructor === Object; |
169 | | - }; |
170 | | - |
171 | | - var assign = function () { |
172 | | - var to = {}; |
173 | | - var arg = arguments; |
174 | | - for (var index = 0; index < arg.length; index++) { |
175 | | - var nextSource = arg[index]; |
176 | | - if (isObject(nextSource)) { |
177 | | - for (var nextKey in nextSource) { |
178 | | - if (hasProp(nextSource, nextKey)) { |
179 | | - to[nextKey] = nextSource[nextKey]; |
180 | | - } |
181 | | - } |
182 | | - } |
183 | | - } |
184 | | - return to; |
185 | | - }; |
186 | | - |
187 | 190 | // Define namespace for the library |
188 | 191 | var namespaceText = "namespace"; |
189 | 192 | var namespace = |
|
0 commit comments