Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function createStateManager(propsOrStateManager) {
// We've already got them!
if (!isArray(propsOrStateManager)) return propsOrStateManager;
// Build them from an array of controllable props.
return {
reducers: propsOrStateManager.reduce((reducers, prop) => {
const callbackName = toCallbackName(prop);
reducers[callbackName] = (currentState, value) => ({[prop]: value});
return reducers;
}, {}),
};
}
exports.default = function(x) {
console.log('Calling isObject 1.0.0');
return x != null && typeof x === 'object' && !isArray(x);
};
});
exports.default = function(x) {
console.log('Calling isObject 1.0.0');
return x != null && typeof x === 'object' && !isArray(x);
};
});
export default function() {
var t;
out.innerHTML += 'Calling isArray([])';
t = isArray([]);
out.innerHTML += ' -> returns ' + t + '.\n';
out.innerHTML += 'Calling isArray({})';
t = isArray({});
out.innerHTML += ' -> returns ' + t + '.\n';
}
Object.keys(data.headers || {}).forEach(k => {
if (isArray(data.headers[k])) {
data.headers[k].forEach((innerHeaderValue, index) => {
data.headers[`${k}.${index}`] = innerHeaderValue;
});
}
});