MCPcopy
hub / github.com/Exrick/xpay / mergeMappings

Function mergeMappings

xpay-code/src/main/resources/static/swagger/swagger-ui.js:11333–11350  ·  view source on GitHub ↗
(state, destination, source, overridableKeys)

Source from the content-addressed store, hash-verified

11331}
11332
11333function mergeMappings(state, destination, source, overridableKeys) {
11334 var sourceKeys, key, index, quantity;
11335
11336 if (!common.isObject(source)) {
11337 throwError(state, 'cannot merge mappings; the provided source object is unacceptable');
11338 }
11339
11340 sourceKeys = Object.keys(source);
11341
11342 for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {
11343 key = sourceKeys[index];
11344
11345 if (!_hasOwnProperty.call(destination, key)) {
11346 destination[key] = source[key];
11347 overridableKeys[key] = true;
11348 }
11349 }
11350}
11351
11352function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode) {
11353 var index, quantity;

Callers 1

storeMappingPairFunction · 0.85

Calls 1

throwErrorFunction · 0.85

Tested by

no test coverage detected