MCPcopy Create free account
hub / github.com/ljharb/qs / arrayToObject

Function arrayToObject

lib/utils.js:59–68  ·  view source on GitHub ↗
(source, options)

Source from the content-addressed store, hash-verified

57};
58
59var arrayToObject = function arrayToObject(source, options) {
60 var obj = options && options.plainObjects ? { __proto__: null } : {};
61 for (var i = 0; i < source.length; ++i) {
62 if (typeof source[i] !== 'undefined') {
63 obj[i] = source[i];
64 }
65 }
66
67 return obj;
68};
69
70var setProperty = function setProperty(obj, key, value) {
71 if (key === '__proto__' && defineProperty) {

Callers 2

mergeFunction · 0.85
combineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected